fetch-asterisk-releases - skip git operations if there is no updates
This commit is contained in:
parent
3735611c62
commit
f0f0c60799
26
.github/workflows/fetch-asterisk-releases.yml
vendored
26
.github/workflows/fetch-asterisk-releases.yml
vendored
@ -32,7 +32,7 @@ jobs:
|
|||||||
- name: Fetch asterisk releases
|
- name: Fetch asterisk releases
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -ueox pipefail
|
set -ueo pipefail
|
||||||
|
|
||||||
URLS=( \
|
URLS=( \
|
||||||
http://downloads.asterisk.org/pub/telephony/asterisk/releases/ \
|
http://downloads.asterisk.org/pub/telephony/asterisk/releases/ \
|
||||||
@ -80,16 +80,20 @@ jobs:
|
|||||||
- name: Commit and push updates
|
- name: Commit and push updates
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -ueox pipefail
|
set -ueo pipefail
|
||||||
|
|
||||||
git config user.email "github-actions@users.noreply.github.com"
|
if [ "$(git status -s)" == "" ]; then
|
||||||
git config user.name "github-actions[bot]"
|
git config user.email "github-actions@users.noreply.github.com"
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
|
||||||
git add ./asterisk-releases.txt
|
git add ./asterisk-releases.txt
|
||||||
git add ./asterisk-certified-releases.txt
|
git add ./asterisk-certified-releases.txt
|
||||||
git commit \
|
git commit \
|
||||||
--all \
|
--all \
|
||||||
--allow-empty \
|
--allow-empty \
|
||||||
--message "[$(date '+%Y-%m-%d %H:%M')] automatic update of asterisk release lists"
|
--message "[$(date '+%Y-%m-%d %H:%M')] automatic update of asterisk release lists"
|
||||||
|
|
||||||
git push
|
git push
|
||||||
|
else
|
||||||
|
echo "Nothing to push, no updates"
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user