Skip to content

Commit e6d4b18

Browse files
authored
Add keepalive GitHub Actions workflow (#82)
1 parent 95d098d commit e6d4b18

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/keepalive.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Keepalive
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 1 * *'
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
keepalive:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Keep repository active
19+
run: |
20+
echo "keepalive: $(date -u +'%Y-%m-%dT%H:%M:%SZ')" > .github/keepalive
21+
22+
- name: Commit keepalive marker
23+
run: |
24+
git config user.name "github-actions[bot]"
25+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
26+
git add .github/keepalive
27+
if git diff --cached --quiet; then
28+
echo "No changes to commit"
29+
exit 0
30+
fi
31+
git commit -m "chore(ci): keepalive"
32+
git push

0 commit comments

Comments
 (0)