-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.31 KB
/
update.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Update Release Data
on:
schedule:
- cron: "0 * * * *" # Run every hour
jobs:
auto-push:
runs-on: ubuntu-latest
env:
OCTOKIT_TOKEN: ${{ secrets.OCTOKIT_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Start
run: bun run src/lib/data.ts
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Check for file changes
id: file-changed
run: |
git add -A # Stage all changes, including new and deleted files
git status --porcelain # Check for any changes in the working directory
if [ -n "$(git status --porcelain)" ]; then
echo "Changes detected."
echo "::set-output name=changed::true"
else
echo "No changes detected."
fi
- name: Commit and push changes
if: steps.file-changed.outputs.changed == 'true'
run: |
git add .
git commit -m "Update release data"
git push origin main