Преглед на файлове

Scheduled action to bump the date on bugfix-2.0.x

Scott Lahteine преди 4 години
родител
ревизия
4c76314c26
променени са 1 файла, в които са добавени 34 реда и са изтрити 0 реда
  1. 34
    0
      .github/workflows/bump-date.yml

+ 34
- 0
.github/workflows/bump-date.yml Целия файл

@@ -0,0 +1,34 @@
1
+#
2
+# bump-date.yml
3
+# Bump the distribution date once per day
4
+#
5
+
6
+name: Bump Distribution Date
7
+
8
+on:
9
+  schedule:
10
+    - cron: '0 0 * * *'
11
+
12
+jobs:
13
+  bump_date:
14
+
15
+    runs-on: ubuntu-latest
16
+
17
+    steps:
18
+
19
+    - name: Check out bugfix-2.0.x
20
+      uses: actions/checkout@v2
21
+      with:
22
+        ref: bugfix-2.0.x
23
+
24
+    - name: Bump Distribution Date
25
+      run: |
26
+        # Inline Bump Script
27
+        [[ "$GITHUB_REPOSITORY" == "MarlinFirmware/Marlin" ]] || exit 0
28
+        DIST=$( date +"%Y-%m-%d" )
29
+        eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
30
+        git config user.name "${GITHUB_ACTOR}" && \
31
+        git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
32
+        git add . && \
33
+        git commit -m "[cron] Bump distribution date ($DIST)" && \
34
+        git push

Loading…
Отказ
Запис