mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
misc(changelog workflow): Minor improvements (#1802)
* misc(changelog workflow): Minor improvements * Update ci.yml * Update ci.yml * Update ci.yml
This commit is contained in:
parent
c331a1d009
commit
15ca21f038
1 changed files with 32 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
name: Changelog & checksums.md5 generation
|
||||
name: Continuous integration
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -29,21 +29,43 @@ jobs:
|
|||
- name: Print the changelog
|
||||
run: cat "${{ steps.git-cliff.outputs.changelog }}"
|
||||
|
||||
- name: Generate checksums file
|
||||
- name: Commit changelog
|
||||
run: |
|
||||
git checkout master
|
||||
git config --local user.name 'belomaxorka'
|
||||
git config --local user.email 'roman25052006.kelesh@gmail.com'
|
||||
set +e
|
||||
git add CHANGELOG.md
|
||||
git commit -m "Update CHANGELOG.md 📖"
|
||||
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git master
|
||||
|
||||
checksums:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- changelog
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: master
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
|
||||
- name: Generate checksums.md5 file
|
||||
run: |
|
||||
find . -type f -not -path "./.git/*" -exec md5sum {} \; > internal_data/checksums.md5
|
||||
|
||||
- name: Commit changes (changelog & updated checksums)
|
||||
- name: Commit and push checksums.md5 if changed
|
||||
run: |
|
||||
git checkout master
|
||||
git config user.name 'belomaxorka'
|
||||
git config user.email 'roman25052006.kelesh@gmail.com'
|
||||
set +e
|
||||
git config --local user.name 'belomaxorka'
|
||||
git config --local user.email 'roman25052006.kelesh@gmail.com'
|
||||
|
||||
if git diff --quiet internal_data/checksums.md5; then
|
||||
echo "No changes in checksums.md5"
|
||||
echo "No changes in internal_data/checksums.md5"
|
||||
else
|
||||
set +e
|
||||
git add internal_data/checksums.md5
|
||||
git commit -m "Update checksums.md5 📄"
|
||||
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git master
|
||||
fi
|
||||
git add CHANGELOG.md
|
||||
git commit -m "Update CHANGELOG.md & checksums.md5"
|
||||
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git master
|
Loading…
Add table
Add a link
Reference in a new issue