Fix daily date bump action
This commit is contained in:
parent
07509febcd
commit
57e37b6c24
2 changed files with 11 additions and 19 deletions
13
.github/workflows/bump-date.yml
vendored
13
.github/workflows/bump-date.yml
vendored
|
@ -7,7 +7,7 @@ name: Bump Distribution Date
|
|||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
bump_date:
|
||||
|
@ -22,4 +22,13 @@ jobs:
|
|||
ref: bugfix-2.0.x
|
||||
|
||||
- name: Bump Distribution Date
|
||||
run: source ./buildroot/bin/bump_date
|
||||
run: |
|
||||
# Inline Bump Script
|
||||
[[ "$GITHUB_ACTOR" == 'MarlinFirmware' ]] || exit 0
|
||||
DIST=$( date +"%Y-%m-%d" )
|
||||
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
|
||||
git config user.name "${GITHUB_ACTOR}" && \
|
||||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
|
||||
git add . && \
|
||||
git commit -m "[cron] Bump distribution date ($DIST)" && \
|
||||
git push
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# bump_date
|
||||
#
|
||||
# Bump the Distribution Date in Version.h
|
||||
#
|
||||
|
||||
VERSION_FILE=Marlin/src/inc/Version.h
|
||||
|
||||
SED=$(which gsed || which sed)
|
||||
|
||||
DIST=$( date +"%Y-%m-%d" )
|
||||
|
||||
eval "${SED} -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' $VERSION_FILE" || exit 1
|
||||
|
||||
git add "$VERSION_FILE" || exit 1
|
||||
git commit -m "[cron] Bump distribution date ($DIST)"
|
Reference in a new issue