Skip to content

Commit

Permalink
Merge pull request #779 from suzuki-shunsuke/revert-777-ci/test-enabl…
Browse files Browse the repository at this point in the history
…e-automerge-workflow

Revert "ci: test renovate-enable-automerge-workflow"
  • Loading branch information
suzuki-shunsuke authored Feb 4, 2023
2 parents c1eb969 + fbcf481 commit 9213e4d
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,25 @@ jobs:
GHALINT_LOG_COLOR: always

enable-automerge:
# Enable automerge to merge pull requests from Renovate automatically.
needs:
- status-check
uses: suzuki-shunsuke/renovate-enable-automerge-workflow/.github/workflows/enable_automerge.yaml@feat/first-pr
secrets:
gh_app_id: ${{secrets.APP_ID}}
gh_app_private_key: ${{secrets.APP_PRIVATE_KEY}}
permissions: {}
if: |
! failure() && ! cancelled() && github.event.pull_request.user.login == 'renovate[bot]' && contains(github.event.pull_request.body, ' **Automerge**: Enabled.')
# Enable automerge to merge pull requests from Renovate automatically.
runs-on: ubuntu-latest
# "! failure() && ! cancelled()" is required. success() returns false if dependent jobs are skipped. https://github.com/community/community/discussions/45058
# By default success() is used so we have to override success() by "! failure() && ! cancelled()"
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c # v1
with:
app_id: ${{secrets.APP_ID}}
private_key: ${{secrets.APP_PRIVATE_KEY}}
- run: gh -R "$GITHUB_REPOSITORY" pr merge --merge --auto --delete-branch "$PR_NUMBER"
env:
GITHUB_TOKEN: ${{steps.generate_token.outputs.token}} # Use GitHub App to trigger GitHub Actions Workflow by merge commit.
PR_NUMBER: ${{github.event.pull_request.number}}

status-check:
# This job is used for main branch's branch protection rule's status check.
Expand Down

0 comments on commit 9213e4d

Please sign in to comment.