@@ -82,16 +82,20 @@ jobs:
82
82
export MESSAGE="${{ env.MESSAGE }}"
83
83
export SHA=$( git rev-parse ${{ env.DESTINATION_BRANCH }}:${{ env.FILE_TO_COMMIT }} )
84
84
export CONTENT=$( base64 -i ${{ env.FILE_TO_COMMIT }} )
85
- gh api --method PUT /repos/:owner/:repo/contents/${{ env.FILE_TO_COMMIT }} \
86
- --field message="${MESSAGE}" \
87
- --field content="${CONTENT}" \
88
- --field encoding="base64" \
89
- --field branch="${{ env.DESTINATION_BRANCH }}" \
90
- --field sha="${SHA}" \
91
- || gh api --method PUT /repos/:owner/:repo/contents/${{ env.FILE_TO_COMMIT }} \
92
- --field message="${MESSAGE}" \
93
- --field content="${CONTENT}" \
94
- --field encoding="base64" \
95
- --field branch="${{ env.DESTINATION_BRANCH }}" \
85
+ if gh api --method PUT /repos/:owner/:repo/contents/${{ env.FILE_TO_COMMIT }} \
86
+ --field message="${MESSAGE}" \
87
+ --field content="${CONTENT}" \
88
+ --field encoding="base64" \
89
+ --field branch="${{ env.DESTINATION_BRANCH }}" \
90
+ --field sha="${SHA}" ; then
91
+ echo "Pushed signed commit to GitHub."
92
+ else if gh api --method PUT /repos/:owner/:repo/contents/${{ env.FILE_TO_COMMIT }} \
93
+ --field message="${MESSAGE}" \
94
+ --field content="${CONTENT}" \
95
+ --field encoding="base64" \
96
+ --field branch="${{ env.DESTINATION_BRANCH }}" \
97
+ echo "Pushed signed commit to GitHub."
98
+ else
96
99
|| echo "No changes to push or errored pushing."
100
+ fi
97
101
gh pr create --base main --head ${{ env.BRANCH }} --title "${{ env.MESSAGE }}" --body "Updates Flux install manifests, patched for use with localhost hostNetwork, to the ${{ env.FLUX_VERSION }} version." --reviewer ${{ github.repository_owner }}
0 commit comments