From 2ab317d5fdd3edd28ccedbe056216f45c98aefa2 Mon Sep 17 00:00:00 2001 From: null8626 Date: Mon, 28 Oct 2024 21:19:33 +0700 Subject: [PATCH] ci: squash with previous commit once the job has created a new one --- .github/workflows/CI.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f1475e42..7b7c009b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -611,6 +611,9 @@ jobs: if: ${{ always() && github.event_name != 'pull_request' }} steps: - uses: actions/checkout@v4 + - name: Pull previous commit + run: git reset --soft HEAD~1 + shell: bash - uses: dtolnay/rust-toolchain@v1 with: toolchain: stable @@ -661,13 +664,17 @@ jobs: passphrase: ${{ secrets.CI_GPG_PASS }} git_user_signingkey: true git_commit_gpgsign: true - - name: Commit + - name: Create commit uses: EndBug/add-and-commit@v9 with: commit: -S - message: 'chore: update files' + message: ${{ github.event.head_commit.message }} + push: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Push commit + run: git push -f + shell: bash pages: name: Deploy to GitHub Pages runs-on: ubuntu-latest