ci: fix checking state of CI in ipfs-webui (#9969)
Piotr Galar committed
Jun 27, 2023 at 12:57 UTC
61f0aa073715f9660b121494672484f8c4b335c2
1 file changed
+4
-4
.github/workflows/build.yml
+4
-4
@@ -175,11 +175,11 @@ jobs:
175
working-directory: ipfs-webui
176
- id: state
177
env:
178
- GITHUB_REPOSITORY: ipfs/ipfs-webui
179
- GITHUB_REF: ${{ steps.ref.outputs.ref }}
178
GITHUB_TOKEN: ${{ github.token }}
181
- run: |
182
- echo "state=$(curl -L -H "Authorization: Bearer $GITHUB_TOKEN" "https://api.github.com/repos/$GITHUB_REPOSITORY/commits/$GITHUB_REF/status" --jq '.state')" | tee -a $GITHUB_OUTPUT
179
+ ENDPOINT: repos/ipfs/ipfs-webui/commits/${{ steps.ref.outputs.ref }}/status
180
+ SELECTOR: .state
181
+ KEY: state
182
+ run: gh api "$ENDPOINT" --jq "$SELECTOR" | xargs -I{} echo "$KEY={}" | tee -a $GITHUB_OUTPUT
183
- name: Build ipfs-webui@main (state=${{ steps.state.outputs.state }})
184
run: npm run test:build
185
working-directory: ipfs-webui