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:
Roman Kelesidis 2025-02-06 15:29:11 +03:00 committed by GitHub
commit 60c6057784
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 34 deletions

View file

@ -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

View file

@ -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