-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ca4574
commit 4af82c8
Showing
1 changed file
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#This action is centrally managed in https://github.com/asyncapi/.github/ | ||
#Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo | ||
# This action is centrally managed in https://github.com/asyncapi/.github/ | ||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo. | ||
|
||
name: Automerge release bump PR | ||
|
||
|
@@ -21,15 +21,27 @@ on: | |
jobs: | ||
|
||
autoapprove: | ||
if: github.event.pull_request.draft == false | ||
if: (github.event.pull_request.draft == false) && (github.actor == 'asyncapi-bot' || github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]') && !contains(github.event.pull_request.labels.*.name, 'released') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Autoapproving | ||
uses: hmarr/auto-approve-action@v2 | ||
if: github.actor == ('asyncapi-bot' || github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]') && !contains(github.event.pull_request.labels.*.name, 'released') | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Label autoapproved | ||
uses: actions/github-script@v5 | ||
with: | ||
github-token: ${{ secrets.GH_TOKEN }} | ||
script: | | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['autoapproved'] | ||
}) | ||
automerge: | ||
needs: [autoapprove] | ||
runs-on: ubuntu-latest | ||
|
@@ -45,15 +57,3 @@ jobs: | |
MERGE_COMMIT_MESSAGE: "pull-request-title" | ||
MERGE_RETRIES: "20" | ||
MERGE_RETRY_SLEEP: "30000" | ||
|
||
labelWhenApproved: | ||
needs: [autoapprove] | ||
name: Label when approved | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Label when approved | ||
uses: pullreminders/[email protected] | ||
env: | ||
APPROVALS: "1" | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ADD_LABEL: "autoapproved" |