Skip to content

Commit

Permalink
Update options for wait-other-jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Apr 15, 2024
1 parent b3c3c05 commit ef26c34
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
44 changes: 18 additions & 26 deletions .github/workflows/merge-bot-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Wait other jobs
uses: kachick/wait-other-jobs@v3.1.0
timeout-minutes: 10
- name: Approve and merge
run: gh pr review --approve "$PR_URL" && gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

# Avoid `automerge` renovate official feature.
# It wait longtime to be merged.
# Avoid `platformAutomerge` renovate official feature.
# It requires many changes in GitHub settings.
# - `Allow auto-merge`
# - `Require status checks to pass before merging` and specify the status names
# Changing in all personal repository is annoy task for me. Even if using terrafform, getting mandatory CI names in each repo is too annoy!
renovate:
timeout-minutes: 30
runs-on: ubuntu-latest
if: ${{ github.actor == 'renovate[bot]' }}
steps:
- name: Wait other jobs
uses: kachick/wait-other-jobs@v3.1.0
timeout-minutes: 10
uses: kachick/wait-other-jobs@v3
with:
retry-method: 'equal_intervals'
min-interval-seconds: '15'
skip-same-workflow: 'true'
skip-list: |
[
{
"workflowFile": "release.yml"
}
]
timeout-minutes: 10
- name: Approve and merge
run: gh pr review --approve "$PR_URL" && gh pr merge --auto --squash "$PR_URL"
env:
Expand All @@ -72,7 +56,15 @@ jobs:
- name: Dump context to debug
run: echo '${{ github.actor }}'
- name: Wait other jobs
uses: kachick/wait-other-jobs@v3.1.0
uses: kachick/wait-other-jobs@v3
with:
skip-same-workflow: 'true'
skip-list: |
[
{
"workflowFile": "release.yml"
}
]
timeout-minutes: 20
- name: Approve and merge
run: gh pr review --approve "$PR_URL" && gh pr merge --auto --delete-branch --squash "$PR_URL"
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@ jobs:
go-version-file: 'go.mod'
cache-dependency-path: 'go.sum'
- name: Wait other jobs
uses: kachick/wait-other-jobs@v3.1.0
uses: kachick/wait-other-jobs@v3
with:
skip-same-workflow: 'true'
skip-list: |
[
{
"workflowFile": "merge-bot-pr.yml"
}
]
if: startsWith(github.ref, 'refs/tags/')
timeout-minutes: 30
- name: Run GoReleaser
Expand Down

0 comments on commit ef26c34

Please sign in to comment.