-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (27 loc) · 977 Bytes
/
keep-workflow-alive.yml
File metadata and controls
32 lines (27 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: 'Keep Workflow Alive'
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
jobs:
keep_alive:
runs-on: ubuntu-latest
steps:
- name: 'Checkout codes'
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: 'Create UUID'
run: echo $(cat /proc/sys/kernel/random/uuid) > UUID
- name: 'Commit Files'
id: commit
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git diff --quiet && git diff --staged --quiet || git commit -am 'Keep Workflow Alive'
echo ::set-output name=status::success
- name: 'GitHub Push'
if: steps.commit.output.status != 'success'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}