Skip to content

Commit b38fb3e

Browse files
committed
add workflows/keepalive.yml
1 parent 4b7cd6a commit b38fb3e

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/keepalive.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# -----------------------------------------------------------------------------
2+
#
3+
# This file is part of the xPack project (http://xpack.github.io).
4+
# Copyright (c) 2025 Liviu Ionescu. All rights reserved.
5+
#
6+
# Permission to use, copy, modify, and/or distribute this software
7+
# for any purpose is hereby granted, under the terms of the MIT license.
8+
#
9+
# If a copy of the license was not distributed with this file, it can
10+
# be obtained from https://opensource.org/licenses/mit.
11+
#
12+
# -----------------------------------------------------------------------------
13+
14+
name: 'Keep Alive'
15+
16+
on:
17+
schedule:
18+
- cron: '0 0 1 * *' # Monthly on the 1st at midnight UTC
19+
workflow_dispatch:
20+
21+
jobs:
22+
keepalive:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Update keepalive timestamp
31+
run: |
32+
echo "Last keepalive: $(date -u)" > .github/keepalive
33+
git config --local user.email "[email protected]"
34+
git config --local user.name "GitHub Action"
35+
git add .github/keepalive
36+
if git diff --staged --quiet; then
37+
echo "No changes to commit"
38+
else
39+
git commit -m "chore: update keepalive timestamp [skip ci]"
40+
git push
41+
fi

0 commit comments

Comments
 (0)