Browse Source

🔨 Prevent two [cron] in a row

FB4S_WIFI
Scott Lahteine 3 years ago
parent
commit
db4172b5fa
  1. 4
      .github/workflows/bump-date.yml

4
.github/workflows/bump-date.yml

@ -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,6 +26,7 @@ jobs:
- name: Bump Distribution Date - name: Bump Distribution Date
run: | run: |
# Inline Bump Script # Inline Bump Script
if [[ ! "$( git log -1 --pretty=%B )" =~ ^\[cron\] ]]; then
DIST=$( date +"%Y-%m-%d" ) DIST=$( date +"%Y-%m-%d" )
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \ eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
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/Version.h" && \
@ -34,3 +35,4 @@ jobs:
git add . && \ git add . && \
git commit -m "[cron] Bump distribution date ($DIST)" && \ git commit -m "[cron] Bump distribution date ($DIST)" && \
git push git push
fi

Loading…
Cancel
Save