mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-26 21:36:21 +00:00
🔨 Prevent two [cron] in a row
This commit is contained in:
parent
242192d03d
commit
db4172b5fa
20
.github/workflows/bump-date.yml
vendored
20
.github/workflows/bump-date.yml
vendored
@ -7,7 +7,7 @@ name: Bump Distribution Date
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 */6 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bump_date:
|
bump_date:
|
||||||
@ -26,11 +26,13 @@ jobs:
|
|||||||
- name: Bump Distribution Date
|
- name: Bump Distribution Date
|
||||||
run: |
|
run: |
|
||||||
# Inline Bump Script
|
# Inline Bump Script
|
||||||
DIST=$( date +"%Y-%m-%d" )
|
if [[ ! "$( git log -1 --pretty=%B )" =~ ^\[cron\] ]]; then
|
||||||
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
|
DIST=$( date +"%Y-%m-%d" )
|
||||||
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/Version.h" && \
|
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
|
||||||
git config user.name "${GITHUB_ACTOR}" && \
|
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/Version.h" && \
|
||||||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
|
git config user.name "${GITHUB_ACTOR}" && \
|
||||||
git add . && \
|
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
|
||||||
git commit -m "[cron] Bump distribution date ($DIST)" && \
|
git add . && \
|
||||||
git push
|
git commit -m "[cron] Bump distribution date ($DIST)" && \
|
||||||
|
git push
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user