mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 17:40:07 -04:00
Prevent empty commit on SITES update. (#2575)
Signed-off-by: Toha <tohenk@yahoo.com>
This commit is contained in:
parent
aa9f0b7b86
commit
7c3d32191d
1 changed files with 8 additions and 6 deletions
14
.github/workflows/update.yml
vendored
14
.github/workflows/update.yml
vendored
|
@ -36,13 +36,15 @@ jobs:
|
||||||
run: npm run sites:update
|
run: npm run sites:update
|
||||||
- run: git status
|
- run: git status
|
||||||
- name: commit changes to sites.md
|
- name: commit changes to sites.md
|
||||||
run: |
|
|
||||||
git add SITES.md
|
|
||||||
git status
|
|
||||||
git commit --allow-empty -m "[Bot] Update SITES.md" -m "Committed by [iptv-bot](https://github.com/apps/iptv-bot) via [update](https://github.com/iptv-org/epg/actions/runs/${{ github.run_id }}) workflow." --no-verify
|
|
||||||
- name: push all changes to the repository
|
|
||||||
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
||||||
run: git push
|
run: |
|
||||||
|
SITE=SITES.md
|
||||||
|
CHANGED=$(git diff ${SITE})
|
||||||
|
if [ -n "${CHANGED}" ]; then
|
||||||
|
git add ${SITE}
|
||||||
|
git commit -m "[Bot] Update ${SITE}" -m "Committed by [iptv-bot](https://github.com/apps/iptv-bot) via [update](https://github.com/iptv-org/epg/actions/runs/${{ github.run_id }}) workflow." --no-verify
|
||||||
|
git push
|
||||||
|
fi
|
||||||
- name: generate .api/guides.json
|
- name: generate .api/guides.json
|
||||||
run: npm run api:generate
|
run: npm run api:generate
|
||||||
- run: git status
|
- run: git status
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue