-
Notifications
You must be signed in to change notification settings - Fork 11
60 lines (51 loc) · 1.37 KB
/
auto-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
52
53
54
55
56
57
58
59
60
name: Update Filters
on:
push:
paths-ignore:
- 'README.md'
- 'README_en.md'
- '.github/**'
- '.devcontainer/**'
- 'LICENSE'
branches: [ main ]
schedule:
- cron: 0 */8 * * *
workflow_dispatch:
env:
TZ: Asia/Shanghai
jobs:
Update_Filters:
runs-on: ubuntu-latest
permissions:
contents: write
actions: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Run Jar
run: mvn spring-boot:run
- name: Commit Changes
id: commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 🚀 CI Updated
- name: GitHub Push
if: steps.commit.outputs.changes_detected == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{secrets.GITHUB_TOKEN}}
branch: ${{github.ref}}
- name: Mirror Refresh
run: sleep 10 && curl 'https://purge.jsdelivr.net/gh/${{github.repository}}/rule'
- name: Delete Workflow Runs
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{secrets.GITHUB_TOKEN}}
repository: ${{ github.repository }}
retain_days: 1
keep_minimum_runs: 1