-
Notifications
You must be signed in to change notification settings - Fork 24
59 lines (47 loc) · 1.26 KB
/
fetch-and-commit.yml
File metadata and controls
59 lines (47 loc) · 1.26 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Fetch And Commit
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * *' # Run daily at midnight (UTC)
workflow_dispatch:
jobs:
fetch-and-commit:
runs-on: ubuntu-latest
permissions:
contents: write
env:
CGO_ENABLED: 0
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24.5'
check-latest: true
- name: Download Go modules
run: go mod download
- name: Tidy Go modules
run: go mod tidy
- name: Wait for 1 second
run: sleep 1
- name: Run Fetch and Convert
run: go run . -f
- name: Run CDN Checker
if: ${{ success() }}
run: go run . -c
- name: Run WARP Checker
if: ${{ success() }}
run: go run . -w
- name: Set timestamp
run: echo "TIMESTAMP=$(date -u +"%H:%M %d-%m-%Y")" >> $GITHUB_ENV
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v6
with:
commit_message: "Auto-Update - (${{ env.TIMESTAMP }})"
file_pattern: 'all_cf_v4.txt all_cdn_v4.txt all_warp_v4.txt'