Skip to content

Commit ec1b101

Browse files
committed
don't do anything if no changes
1 parent ff95931 commit ec1b101

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/generate_bindings.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,26 @@ jobs:
6565
- name: Prune Output
6666
run: |
6767
find ${{ env.OUTPUT_PATH }} -type f ! -name "*.rs" -delete
68+
- name: Check for changes
69+
id: check_changes
70+
run: |
71+
if [[ -n $(git status --porcelain) ]]; then
72+
echo "changes=true" >> "$GITHUB_OUTPUT";
73+
fi
6874
- name: Commit Changes
75+
if: steps.check_changes.outputs.changes
6976
run: |
7077
git checkout -b ${{ env.BRANCH_NAME }} || git checkout ${{ env.BRANCH_NAME }}
7178
git add -A
7279
git commit -m "chore(codegen): update bevy bindings"
7380
git push -u origin ${{ env.BRANCH_NAME }} --force
7481
- uses: jwalton/gh-find-current-pr@master
82+
if: steps.check_changes.outputs.changes
7583
id: findPR
7684
with:
7785
state: all
7886
- name: Create Or Update PR
79-
if: success() && steps.findPR.outputs.number
87+
if: steps.check_changes.outputs.changes && success() && steps.findPR.outputs.number
8088
run: |
8189
gh pr list --base feature/bevy-system-refactor --search "chore(codegen): update bevy bindings" --json number > prs.json
8290
if [ $(jq '. | length' prs.json) -eq 0 ]; then

0 commit comments

Comments
 (0)