mirror of https://github.com/hacamer/AdRule.git
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
name: Update Rules
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '30 0,8,16 * * *'
|
|
repository_dispatch:
|
|
type:
|
|
- [Manual-Update]
|
|
|
|
jobs:
|
|
Pushed:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
- name: Clean Versions & Update file
|
|
run: |
|
|
bash clean-versions.sh
|
|
#bash ./adrules/main.sh
|
|
echo 'OK!'
|
|
- name: Git push assets to github
|
|
run: |
|
|
git init
|
|
git config --local user.name "hacamer"
|
|
git config --local user.email "hcamer145@gmail.com"
|
|
git branch -m main
|
|
git add .
|
|
git commit -m "Updated at $(TZ=UTC-8 date +'%Y-%m-%d %H:%M:%S')(北京时间)"
|
|
git push -f
|
|
|
|
- name: Git push assets to coding
|
|
run: |
|
|
rm -rf .git/
|
|
git init
|
|
git config --local user.name "hacamer"
|
|
git config --local user.email "hcamer145@gmail.com"
|
|
git branch -m main
|
|
git add .
|
|
git commit -m "Updated at $(TZ=UTC-8 date +'%Y-%m-%d %H:%M:%S')(北京时间)"
|
|
#git remote add origin "https://github.com/Cats-Team/AdRule.git"
|
|
git remote add origin "https://${{ secrets.CODING_TokenUser }}:${{ secrets.CODING_Token }}@e.coding.net/hacamer/adgurd/adrules.git"
|
|
#git fetch --unshallow origin
|
|
git push -u -f origin main
|
|
#git push -f
|
|
#git push --set-upstream origin main
|
|
|