forked from qxzg/Actions
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (41 loc) · 1.2 KB
/
fancyss-rules-3.0.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
name: Update Fancyss Rules 3.0
on:
push:
branches: ['3.0']
paths:
- '.github/workflows/fancyss-rules-3.0.yml'
- 'fancyss_rules/auto_update/*'
workflow_dispatch:
inputs:
FORCE_PUSH:
description: 'Force to push'
required: true
default: 'true'
schedule:
- cron: '45 19 * * *'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Run update script
run: |
sudo apt-get install moreutils jq
cd fancyss_rules/auto_update
chmod +x fwlist.py
bash update_rules.sh
- name: Commit to repo
run: |
cd $GITHUB_WORKSPACE
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add fancyss_rules/.
git commit -m "Actions Auto Update at $(date +'%Y-%m-%d %H:%M:%S')"
git push
- name: Delete old workflow runs
uses: GitRML/delete-workflow-runs@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
keep_minimum_runs: 7
retain_days: 7