Skip to content

Commit

Permalink
Update dependabot auto-merge workflow to work with recent GitHub chan…
Browse files Browse the repository at this point in the history
…ges (#719)
  • Loading branch information
AlCalzone authored Apr 5, 2021
1 parent a75479a commit 893e490
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
name: Auto-Merge Dependabot PRs

on:
pull_request:
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
# details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
pull_request_target:

jobs:
auto-merge:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
## __WORK IN PROGRESS__
* (AlCalzone) The generated `io-package.json` files are now validated with the official JSON schema during tests (#711)
* (UncleSamSwiss) Source code refactoring for web based create-adapter application (#716)
* (AlCalzone) Update Dependabot auto-merge workflow to work with recent GitHub changes (#719) · [Migration guide](docs/updates/20210405_automerge_fixes.md)

## 1.32.0 (2021-03-09)
* (AlCalzone) Update Readme: remove snyk.io badge, use https (#655)
Expand Down
17 changes: 17 additions & 0 deletions docs/updates/20210405_automerge_fixes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Update Dependabot auto-merge workflow to work with recent GitHub changes

GitHub recently changed the permissions for workflow triggered by Dependabot PRs: https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/

To handle these changes, edit the workflow file `.github/workflows/dependabot-auto-merge.yml` as follows:

```diff
on:
- pull_request:
+ # WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
+ # details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
+ pull_request_target:

jobs:
auto-merge:
+ if: github.actor == 'dependabot[bot]'
```
5 changes: 4 additions & 1 deletion templates/_github/workflows/dependabot-auto-merge.raw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
name: Auto-Merge Dependabot PRs

on:
pull_request:
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
# details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
pull_request_target:

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
name: Auto-Merge Dependabot PRs

on:
pull_request:
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
# details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
pull_request_target:

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
name: Auto-Merge Dependabot PRs

on:
pull_request:
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
# details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
pull_request_target:

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
name: Auto-Merge Dependabot PRs

on:
pull_request:
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
# details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
pull_request_target:

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
name: Auto-Merge Dependabot PRs

on:
pull_request:
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
# details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
pull_request_target:

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
name: Auto-Merge Dependabot PRs

on:
pull_request:
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
# details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
pull_request_target:

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
name: Auto-Merge Dependabot PRs

on:
pull_request:
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
# details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
pull_request_target:

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
name: Auto-Merge Dependabot PRs

on:
pull_request:
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
# details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
pull_request_target:

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
name: Auto-Merge Dependabot PRs

on:
pull_request:
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
# details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
pull_request_target:

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down

0 comments on commit 893e490

Please sign in to comment.