Skip to content

Commit

Permalink
[install] in .github/workflows/archiver.yml create version_info.dat a…
Browse files Browse the repository at this point in the history
…nd push it to the INFO branch
  • Loading branch information
valassi committed Sep 28, 2024
1 parent 750ce73 commit e4fcef3
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/archiver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,21 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: create_infodat
run: python3 .github/workflows/archiver.py version_info.dat
run: python3 .github/workflows/archiver.py TMP_version_info.dat
- name: commit_infodat
run: |
git config user.name github-actions
git config user.email github-actions@github.com
# Note: 'git checkout INFO' would fails if it found version_info.dat
git checkout INFO
git config --local user.email "action@github.com"
git config --local user.name "github-actions"
mv TMP_version_info.dat version_info.dat
if [ -z "$(git status --porcelain version_info.dat)" ]; then
echo "Nothing to commit"
else
echo "Commit and push version_info.dat"
git commit -m "Update version_info.dat" version_info.dat
echo "::set-output name=push::true"
fi
shell: bash
- name: Push changes
if: steps.commit.outputs.push == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
echo "Update version_info.dat" > msg.txt
echo "" >> msg.txt
git diff version_info.dat | tail --lines=+6 >> msg.txt
git commit -F msg.txt version_info.dat
git push
fi

0 comments on commit e4fcef3

Please sign in to comment.