mirror of
https://github.com/privacy-protection-tools/anti-AD.git
synced 2025-02-02 11:43:00 +08:00
Create sync2gitee.yml
This commit is contained in:
parent
b527939c67
commit
1e8d0004c4
36
.github/workflows/sync2gitee.yml
vendored
Normal file
36
.github/workflows/sync2gitee.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: sync list to gitee
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
paths:
|
||||||
|
- 'anti-ad-*.txt'
|
||||||
|
- 'adblock-for-dnsmasq.conf'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: clone the gitee
|
||||||
|
run: git clone https://gitee.com/privacy-protection-tools/anti-ad.git ~/gitee
|
||||||
|
- name: copy some list files
|
||||||
|
run: |
|
||||||
|
echo "machine github.com">~/.netrc
|
||||||
|
echo "\tlogin ${{ secrets.GITEE_USER }}">>~/.netrc
|
||||||
|
echo "\tpassword ${{ secrets.GITEE_PASS }}">>~/.netrc
|
||||||
|
cp ./anti-ad-easylist.txt ~/gitee/easylist.txt
|
||||||
|
cp ./adblock-for-dnsmasq.conf ~/gitee/dnsmasq.conf
|
||||||
|
cp ./anti-ad-surge.txt ~/gitee/surge.txt
|
||||||
|
cp ./anti-ad-domains.txt ~/gitee/domains.txt
|
||||||
|
- name: Commit files
|
||||||
|
run: |
|
||||||
|
cd ~/gitee
|
||||||
|
git config --local user.email "${{ secrets.GITEE_EMAIL }}"
|
||||||
|
git config --local user.name "GitHub Action"
|
||||||
|
git add .
|
||||||
|
git commit -m "pull newest list." -a
|
||||||
|
git push -u origin master
|
Loading…
Reference in New Issue
Block a user