Skip to content

Commit

Permalink
[gh workflow] Failing step when http response code is not 204
Browse files Browse the repository at this point in the history
  • Loading branch information
didierofrivia committed Apr 17, 2023
1 parent 5b1bad4 commit 54142d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/update-stored-dependencies-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ jobs:
id: update
run: |
var=$(echo ${{ matrix.repository }} | sed -E 's/-/_/g;s/[a-z]/\U&/g')_SHA
curl -L -X PATCH "https://api.github.com/repos/Kuadrant/kuadrant-operator/actions/variables/${{steps.extract-sha-var.outputs.var}}" -H "X-GitHub-Api-Version: 2022-11-28" -H 'Authorization: Bearer ${{ secrets.UPDATE_ACTION_VARS_TOKEN }}' -H 'Accept: application/vnd.github+json' -d '{ "value": "${{ steps.extract-sha-var.outputs.sha }}" }'
http_code=$(curl --write-out "%{http_code}\n" -L -X PATCH "https://api.github.com/repos/Kuadrant/kuadrant-operator/actions/variables/${{steps.extract-sha-var.outputs.var}}" -H "X-GitHub-Api-Version: 2022-11-28" -H 'Authorization: Bearer ${{ secrets.UPDATE_ACTION_VARS_TOKEN }}' -H 'Accept: application/vnd.github+json' -d '{ "value": "${{ steps.extract-sha-var.outputs.sha }}" }')
if [[ $http_code != 204 ]]; then
exit 1
fi

0 comments on commit 54142d8

Please sign in to comment.