diff --git a/.github/workflows/id_fixup.yml b/.github/workflows/id_fixup.yml deleted file mode 100644 index 8afb96e..0000000 --- a/.github/workflows/id_fixup.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: ID Fixup - -on: - push: - branches: - - main - paths-ignore: - - 'README.md' - - 'LICENSE' - -jobs: - build-and-push: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - with: - token: ${{ secrets.BOT_GITHUB_TOKEN }} - fetch-depth: 0 - - - name: Setup Git - run: | - git config --global user.name "AnkiTUM-Bot" - git config --global user.email ${{ secrets.BOT_GITHUB_EMAIL }} - - - name: Run ID Fixup Script - run: | - pip install -r .github/workflows/requirements.txt --user - python3 .github/workflows/id_fixup.py - - - name: Commit and Push Changes - run: | - git add . - git commit -m "Auto-fixup IDs by GitHub Actions" - git push diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index f5f7469..ec51311 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -13,12 +13,20 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN }} + fetch-depth: 0 - name: Set up Python 3.x environment uses: actions/setup-python@v2 with: python-version: '3.x' + + - name: Setup Git + run: | + git config --global user.name "AnkiTUM-Bot" + git config --global user.email ${{ secrets.BOT_GITHUB_EMAIL }} - name: Set up private key env: @@ -28,6 +36,14 @@ jobs: echo "$SSH_PRIVATE_KEY" | base64 --decode > $HOME/.ssh/id_ed25519 chmod 600 $HOME/.ssh/id_ed25519 ssh-keyscan -H ${{ secrets.MIRROR_IP }} >> $HOME/.ssh/known_hosts + + - name: Run ID Fixup Script + run: | + pip install -r .github/workflows/requirements.txt --user + python3 .github/workflows/id_fixup.py ./ + git add . + git commit -m "Auto-fixup IDs by GitHub Actions" + git push - name: Install dependencies run: |