forked from go-openapi/jsonpointer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: configured auto-approve & auto-merge for github actions
Signed-off-by: Frederic BIDON <[email protected]>
- Loading branch information
Showing
2 changed files
with
64 additions
and
9 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,11 +1,30 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
day: "friday" | ||
open-pull-requests-limit: 3 # <- default is 5 | ||
groups: # <- group all github actions updates in a single PR | ||
development-dependencies: | ||
dependency-type: development | ||
patterns: | ||
- '*' | ||
|
||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
day: "friday" | ||
open-pull-requests-limit: 3 | ||
groups: | ||
development-dependencies: | ||
dependency-type: development | ||
patterns: | ||
- "github.com/stretchr/testify" | ||
go-openapi-dependencies: | ||
dependency-type: production | ||
patterns: | ||
- "github.com/go-openapi/*" | ||
|
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Dependabot auto-merge | ||
on: pull_request | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'dependabot[bot]' | ||
steps: | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v1 | ||
|
||
- name: Auto-approve dependabot PRs | ||
run: gh pr review --approve "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Auto-merge dependabot PRs for development dependencies | ||
if: contains(steps.metadata.outputs.dependency-group, 'development-dependencies') | ||
run: gh pr merge --auto --rebase "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Auto-merge dependabot PRs for go-openapi patches | ||
if: contains(steps.metadata.outputs.dependency-group, 'go-openapi-dependencies') & steps.metadata.outputs.update-type == 'version-update:semver-patch' | ||
run: gh pr merge --auto --rebase "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|