-
Notifications
You must be signed in to change notification settings - Fork 4
34 lines (30 loc) · 1.12 KB
/
keep-alive.yml
File metadata and controls
34 lines (30 loc) · 1.12 KB
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
33
34
name: Keep Workflow Alive
description: |
This workflow is designed to keep the repository alive by making a dummy commit
to the `keepalive` branch to make sure the GitHub workflow will continue to run.
It runs on a weekly schedule and can also be triggered manually via the GitHub
Actions UI.
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
keepalive:
runs-on: ubuntu-latest
permissions:
contents: write # Required to push changes to the repository
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Make dummy commit to keep workflow alive
run: |
git fetch origin keepalive
git checkout keepalive
echo "Last update from $(date -u)" > keepalive
git add keepalive
git commit -m "chore: keepalive" || echo "No changes to commit"
git push origin keepalive