Skip to content

Commit

Permalink
Update update.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ObcbO committed Apr 22, 2023
1 parent d487ed4 commit 02c50fc
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,24 @@ jobs:

- name: Submodule
run: sh update.sh


- name: Check for changes
id: check_changes
run: |
if git diff --quiet; then
echo "No changes detected"
echo "::set-output name=push_required::false"
else
echo "Changes detected"
echo "::set-output name=push_required::true"
fi
- name: Deploy
if: steps.check_changes.outputs.push_required == 'true'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@github.com"
git add --all
git commit -m "$(date +'%Y-%m-%dT%H:%M:%S')"
git push

0 comments on commit 02c50fc

Please sign in to comment.