mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-05-04 14:44:16 -04:00
adding file check
This commit is contained in:
parent
f8b7f503ed
commit
31068f5406
1 changed files with 14 additions and 3 deletions
17
.github/workflows/qmk_userspace_build.yml
vendored
17
.github/workflows/qmk_userspace_build.yml
vendored
|
@ -13,6 +13,11 @@ on:
|
||||||
default: "master"
|
default: "master"
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
qmk_nontree_json:
|
||||||
|
description: "json file containing non-tree keyboards"
|
||||||
|
default: "$GITHUB_WORKSPACE/qmk_nontree.json"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
@ -61,17 +66,23 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
qmk userspace-doctor
|
qmk userspace-doctor
|
||||||
|
|
||||||
|
- name: Check if non-tree keyboard json file exists
|
||||||
|
id: check_json_files
|
||||||
|
uses: andstor/file-existence-action@v2
|
||||||
|
with:
|
||||||
|
files: ${{ inputs.qmk_nontree_json }}
|
||||||
|
|
||||||
- name: Read Non-Tree Targets from JSON file
|
- name: Read Non-Tree Targets from JSON file
|
||||||
|
if: steps.check_json_files.outputs.files_exists == 'true'
|
||||||
run: |
|
run: |
|
||||||
{
|
{
|
||||||
echo 'COPY_TARGETS<<EOF'
|
echo 'COPY_TARGETS<<EOF'
|
||||||
cat $GITHUB_WORKSPACE/qmk_nontree.json 2>/dev/null
|
cat ${{ inputs.qmk_nontree_json }}
|
||||||
echo ''
|
|
||||||
echo 'EOF'
|
echo 'EOF'
|
||||||
} >> "$GITHUB_ENV"
|
} >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Copy Non-Tree Keyboard Defintions from Userspace to QMK Firmware
|
- name: Copy Non-Tree Keyboard Defintions from Userspace to QMK Firmware
|
||||||
if: ${{ env.COPY_TARGETS == '' }}
|
if: steps.check_json_files.outputs.files_exists == 'true'
|
||||||
run: |
|
run: |
|
||||||
for target in ${{ join(fromJson(env.COPY_TARGETS).nontree_targets, ' ') }};
|
for target in ${{ join(fromJson(env.COPY_TARGETS).nontree_targets, ' ') }};
|
||||||
do
|
do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue