Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Commit

Permalink
Do not use external action for jq (#1)
Browse files Browse the repository at this point in the history
* Update action.yml

* Update action.yml

* Update action.yml

* Update action.yml

* Update action.yml

* Update action.yml
  • Loading branch information
oleksiikutuzov authored Nov 11, 2022
1 parent 897579b commit 0486277
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ runs:
shell: bash
run: echo "$GITHUB_WORKSPACE/flipperzero-ufbt" >> $GITHUB_PATH

- name: Get directory.json
shell: bash
run: curl -o directory.json https://update.flipperzero.one/firmware/directory.json

- if: ${{ inputs.channel == 'dev' }}
shell: bash
run: echo "{CHANNEL}={0}" >> $GITHUB_ENV
Expand All @@ -41,11 +37,13 @@ runs:
shell: bash
run: echo "{CHANNEL}={2}" >> $GITHUB_ENV

- name: Extract version from package.json
uses: sergeysova/jq-action@v2
id: version
with:
cmd: 'jq .channels[${{ env.CHANNEL }}].versions[0].version directory.json -r'
- name: Get directory.json
shell: bash
run: curl -o directory.json https://update.flipperzero.one/firmware/directory.json

- name: Extract commit id
shell: bash
run: echo "COMMIT_ID=$(jq -r '.channels[0].versions[0].version' directory.json)" >> $GITHUB_ENV

- name: Cache toolchain
id: cache-fbt
Expand All @@ -54,9 +52,9 @@ runs:
cache-name: cache-ufbt
with:
path: flipperzero-ufbt/.ufbt/
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.channel }}-${{ steps.version.outputs.value }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.channel }}-${{ env.COMMIT_ID }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ inputs.channel }}-${{ steps.version.outputs.value }}
${{ runner.os }}-${{ env.cache-name }}-${{ inputs.channel }}-${{ env.COMMIT_ID }}
- if: ${{ steps.cache-fbt.outputs.cache-hit != 'true' }}
name: Update fbt
Expand Down

0 comments on commit 0486277

Please sign in to comment.