From 56a6b9359f93e6e4644b60ec8fabae6525e7a71c Mon Sep 17 00:00:00 2001 From: Dorae <86833913+Toperlock@users.noreply.github.com> Date: Tue, 5 Dec 2023 22:28:47 +0800 Subject: [PATCH] Create sync.yml --- .github/workflows/sync.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/sync.yml diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 0000000..f621feb --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,33 @@ +name: Config Update + +on: + push: + branches: [ main ] + workflow_dispatch: + schedule: + - cron: '0 12 * * *' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python3 + uses: actions/setup-python@v2 + with: + python-version: 3.x + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pandas + - name: Run script + run: python ../main.py + working-directory: ./rule/ + - name: Commit and push config.json + run: | + git config --global user.email "action@github.com" + git config --global user.name "GitHub Action" + git add ./*.json + git commit -m "Add JSON files" + git push