Skip to content

Commit c1b9d9a

Browse files
authored
fix: compile versions workflow creating empty prs (#277)
<!-- Thank you for proposing a pull request! Please note that SOME TESTS WILL LIKELY FAIL due to how GitHub exposes secrets in Pull Requests from forks. Someone from the team will review your Pull Request and respond. Please describe your change and any implementation details below. -->
1 parent abbf233 commit c1b9d9a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/compile-versions.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,16 @@ jobs:
3838
run: |-
3939
if git diff --exit-code ./data/versions.json; then
4040
echo "No changes"
41+
echo "had_changes=false" >> ${GITHUB_OUTPUT}
4142
exit 0
4243
fi
4344
4445
echo "had_changes=true" >> ${GITHUB_OUTPUT}
4546
4647
# Create a pull request with updated files
4748
- name: 'Create/Update Pull Request'
48-
if: |
49-
${{ steps.updates.outputs.had_changes == 'true' }}
49+
# Skip if there a no changes
50+
if: '${{ fromJSON(steps.updates.outputs.had_changes) }}'
5051
uses: 'abcxyz/pkg/.github/actions/create-pull-request@45258f93afbaca705ef0503c37ef88451ed45b02' # ratchet:abcxyz/pkg/.github/actions/create-pull-request@main
5152
with:
5253
token: '${{ secrets.ACTIONS_BOT_TOKEN }}'

0 commit comments

Comments
 (0)