diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml deleted file mode 100644 index 179b5d8..0000000 --- a/.github/workflows/check.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: Check - -on: - pull_request: - -jobs: - check: - name: Check - runs-on: ubuntu-latest - steps: - - name: Check - run: | - function checks() { - (gh pr checks ${{ github.event.pull_request.html_url }} || true) | - grep --invert-match ${{ github.run_id }} - } - - function count() { - checks | - cut --fields=2 | - (grep --count "$@" || true) - } - - while true; do - count=$(count pending) - if ((count > 0)); then - echo "Waiting for $count checks to complete..." - sleep 10 - else - break - fi - done - - count=$(count fail) - if ((count > 0)); then - echo "$count checks failed" - exit 1 - else - echo "All checks passed" - exit 0 - fi - env: - GH_TOKEN: ${{ github.token }} diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index 264df59..4cac86e 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -17,6 +17,10 @@ jobs: steps: - name: Check run: | + set -o errexit + set -o nounset + set -o pipefail + function checks() { (gh pr checks "${{ github.event.pull_request.html_url }}" || true) | grep --invert-match "${{ github.run_id }}" @@ -55,7 +59,7 @@ jobs: github.event.pull_request.user.login == 'pre-commit-ci[bot]' runs-on: ubuntu-latest steps: - - name: Enable auto-merge + - name: Enable auto-merge (squash) run: gh pr merge ${{ github.event.pull_request.html_url }} --auto --squash env: GH_TOKEN: ${{ github.token }} diff --git a/.github/workflows/template.yaml b/.github/workflows/template.yaml index 1b79480..d258c31 100644 --- a/.github/workflows/template.yaml +++ b/.github/workflows/template.yaml @@ -19,7 +19,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - token: ${{ secrets.GH_PAT }} + token: ${{ secrets.GH_TOKEN }} - name: Sync with template repository uses: liblaf/template@main with: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5016719..953097c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: hooks: - id: latexindent - repo: https://github.com/commitizen-tools/commitizen - rev: v3.13.0 + rev: 3.12.0 hooks: - id: commitizen - repo: https://github.com/koalaman/shellcheck-precommit @@ -41,7 +41,7 @@ repos: - c++ - cuda - repo: https://github.com/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.3 + rev: v3.1.0 hooks: - id: prettier stages: