Skip to content

Commit

Permalink
Adds check for if there are changes to make the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
1Solon committed Sep 30, 2024
1 parent f569459 commit e9c3d95
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/update-flux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,22 @@ jobs:
git push --set-upstream origin gh-actions/flux-update
else
echo "No changes to commit."
echo "no changes" > /tmp/no-changes.txt
fi
shell: bash

- name: Check for changes
id: changes
run: |
if [ -f /tmp/no-changes.txt ]; then
echo "::set-output name=changes::false"
else
echo "::set-output name=changes::true"
fi
shell: bash

- name: Create Pull Request
if: steps.changes.outputs.changes == 'true'
run: gh pr create -B master -H gh-actions/flux-update --title 'Update Flux' --body 'Updates flux components using Flux CLI'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e9c3d95

Please sign in to comment.