From 0fca428425e4312ca73a5c5d3ed0c5fc17a7df00 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Wed, 11 Feb 2026 20:37:31 +0900 Subject: [PATCH] ci: Use taiki-e/github-actions/.github/workflows/gen.yml reusable workflow --- .github/workflows/manifest.yml | 55 ++++++++-------------------------- 1 file changed, 13 insertions(+), 42 deletions(-) diff --git a/.github/workflows/manifest.yml b/.github/workflows/manifest.yml index 4c6297d7..02f9eac5 100644 --- a/.github/workflows/manifest.yml +++ b/.github/workflows/manifest.yml @@ -33,47 +33,18 @@ concurrency: jobs: manifest: - runs-on: ubuntu-latest - timeout-minutes: 60 + uses: taiki-e/github-actions/.github/workflows/gen.yml@main permissions: contents: read - pull-requests: write # for gh pr review --approve - steps: - - uses: taiki-e/checkout-action@v1 - - uses: taiki-e/github-actions/install-rust@stable - - name: Generate Cargo.lock - run: cargo update - - uses: Swatinem/rust-cache@v2 - with: - cache-all-crates: 'true' - - run: tools/manifest.sh - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Handle diff - id: diff - run: tools/ci/manifest.sh - if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'push' && github.ref == 'refs/heads/main') - - run: git add -N . && git -c color.ui=always diff --exit-code - - id: create-pull-request - uses: peter-evans/create-pull-request@v8 - with: - title: Update manifest - body: | - Auto-generated by CI using [create-pull-request](https://github.com/peter-evans/create-pull-request). - - This will be auto-merged when CI has passed because this is an auto-generated PR in a defined format and is usually considered no additional review is required. - branch: update-manifest - token: ${{ secrets.CREATE_PR_TOKEN }} - if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' - - name: Enable auto-merge for auto-generated PR - run: gh pr merge --rebase --auto "${PR_NUMBER:?}" - env: - GITHUB_TOKEN: ${{ secrets.CREATE_PR_TOKEN }} - PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }} - if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' && steps.create-pull-request.outputs.pull-request-operation == 'created' - - name: Approve auto-generated PR for auto-merge - run: gh pr review --approve "${PR_NUMBER:?}" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }} - if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' && (steps.create-pull-request.outputs.pull-request-operation == 'created' || steps.create-pull-request.outputs.pull-request-operation == 'updated') + pull-requests: write # for gh pr edit --add-assignee / gh pr review --approve + repository-projects: read # for gh pr edit --add-assignee + secrets: inherit + with: + script: tools/manifest.sh + commit-script: tools/ci/manifest.sh + title: Update manifest + branch: update-manifest + automerge: true + install-rust: true + rust: stable + rust-cache: true