mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
misc(workflow): Trying combine changelog workflow
with checksums workflow
(#1800)
* misc(workflow): Trying combine changelog workflow with checksums workflow * Update changelog.yml * Update changelog.yml
This commit is contained in:
parent
be6be3a6a2
commit
60c6057784
2 changed files with 12 additions and 34 deletions
15
.github/workflows/changelog.yml
vendored
15
.github/workflows/changelog.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: Changelog generation
|
name: Changelog & checksums.md5 generation
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -29,12 +29,21 @@ jobs:
|
||||||
- name: Print the changelog
|
- name: Print the changelog
|
||||||
run: cat "${{ steps.git-cliff.outputs.changelog }}"
|
run: cat "${{ steps.git-cliff.outputs.changelog }}"
|
||||||
|
|
||||||
- name: Commit changelog
|
- name: Generate checksums file
|
||||||
|
run: |
|
||||||
|
find . -type f -not -path "./.git/*" -exec md5sum {} \; > internal_data/checksums.md5
|
||||||
|
|
||||||
|
- name: Commit changes (changelog & updated checksums)
|
||||||
run: |
|
run: |
|
||||||
git checkout master
|
git checkout master
|
||||||
git config user.name 'belomaxorka'
|
git config user.name 'belomaxorka'
|
||||||
git config user.email 'roman25052006.kelesh@gmail.com'
|
git config user.email 'roman25052006.kelesh@gmail.com'
|
||||||
set +e
|
set +e
|
||||||
|
if git diff --quiet internal_data/checksums.md5; then
|
||||||
|
echo "No changes in checksums.md5"
|
||||||
|
else
|
||||||
|
git add internal_data/checksums.md5
|
||||||
|
fi
|
||||||
git add CHANGELOG.md
|
git add CHANGELOG.md
|
||||||
git commit -m "Update CHANGELOG.md 📖"
|
git commit -m "Update CHANGELOG.md & checksums.md5"
|
||||||
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git master
|
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git master
|
||||||
|
|
31
.github/workflows/checksum.yml
vendored
31
.github/workflows/checksum.yml
vendored
|
@ -1,31 +0,0 @@
|
||||||
name: Generate Checksums
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
generate-checksums:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Generate MD5 checksums
|
|
||||||
run: |
|
|
||||||
find . -type f -not -path "./.git/*" -exec md5sum {} \; > internal_data/checksums.md5
|
|
||||||
|
|
||||||
- name: Commit and push checksums.md5 if changed
|
|
||||||
run: |
|
|
||||||
git config --local user.email "action@github.com"
|
|
||||||
git config --local user.name "GitHub Action"
|
|
||||||
|
|
||||||
if git diff --quiet internal_data/checksums.md5; then
|
|
||||||
echo "No changes in checksums.md5"
|
|
||||||
else
|
|
||||||
git add internal_data/checksums.md5
|
|
||||||
git commit -m "Update checksums.md5 📄"
|
|
||||||
git push
|
|
||||||
fi
|
|
Loading…
Add table
Add a link
Reference in a new issue