-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.03 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
name: Update Rules
on:
schedule:
- cron: '0 1 1 * *'
workflow_dispatch:
jobs:
run_shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Update Adguard
run: |
bash ./shell/Adguard/adguard.sh
- name: Update Adguard Home
run: |
bash ./shell/AGH/dns.sh
- name: Move files
run: |
cd shell
mv adguard.txt dns.txt ../rules
- name: Git push assets to Github and Coding
run: |
git init
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git branch -m main
git add --all
git commit -m "Updated at $(date)"
git remote set-url origin git@github.com:MohamedElashri/filters.git
git push https://$USERNAME:$REPO_KEY@github.com/MohamedElashri/filters.git
env:
REPO_KEY: ${{secrets.GITHUB_TOKEN}}
USERNAME: github-actions[bot]