forked from MarlinFirmware/Marlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scheduled action to bump the date on bugfix-2.0.x
- Loading branch information
1 parent
64ab254
commit 4c76314
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# | ||
# bump-date.yml | ||
# Bump the distribution date once per day | ||
# | ||
|
||
name: Bump Distribution Date | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
bump_date: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Check out bugfix-2.0.x | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: bugfix-2.0.x | ||
|
||
- name: Bump Distribution Date | ||
run: | | ||
# Inline Bump Script | ||
[[ "$GITHUB_REPOSITORY" == "MarlinFirmware/Marlin" ]] || 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 |