Skip to content

Commit

Permalink
Add a check whether there are actual changes to commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Garanas committed May 28, 2024
1 parent 21fb304 commit 7b94e38
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/generate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,26 @@ jobs:
if: ${{ github.event.inputs.update == 'true' || inputs.update == true }}
working-directory: app/data
run: |
# Check for any differences between the working directory and the latest commit
if git diff --quiet; then
echo "No changes to commit"
exit 0
fi
# Configure git
git config user.email "[email protected]"
git config user.name "FAForever"
# Add and commit the changes
git stage .
git commit -m 'Update generated data to game version ${{ fromJson(steps.gameVersionJSON.outputs.json).version }}
Commit hash of FA repository: ${{ steps.hashFA.outputs.hash }}
Commit hash of Nomads repository: ${{ steps.hashNomads.outputs.hash }}'
git log
# git push origin HEAD:master

# git tag "${{ fromJson(steps.gameVersionJSON.outputs.json).version}}"
Expand Down

0 comments on commit 7b94e38

Please sign in to comment.