From 3762f632800819a324f840b3b6efe847f33c807d Mon Sep 17 00:00:00 2001 From: snakem982 Date: Fri, 30 Aug 2024 17:45:21 +0800 Subject: [PATCH] add workflow --- .github/workflows/updateclash.yaml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/updateclash.yaml diff --git a/.github/workflows/updateclash.yaml b/.github/workflows/updateclash.yaml new file mode 100644 index 0000000..e82966c --- /dev/null +++ b/.github/workflows/updateclash.yaml @@ -0,0 +1,32 @@ +name: update clash-meta.yaml + +on: + push: + branches: + - main + schedule: + - cron: '0 23 * * *' + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Git Config + run: | + git config --global user.email snakem982@gmail.com + git config --global user.name snakem982 + + - name: Update Clash + run: | + wget -O source/clash-meta.yaml ${{ secrets.CLASH_API }} + + - name: Git Push + run: | + git add . + git commit -m "update clash-meta.yaml" + git push origin master +