-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🤖 Auto approve provider release PRs (#4844)
Signed-off-by: Christian Zunker <[email protected]>
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 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 |
---|---|---|
|
@@ -172,6 +172,29 @@ jobs: | |
fail-on-alert: true | ||
save-data-file: false | ||
alert-threshold: '150%' | ||
|
||
go-auto-approve: | ||
runs-on: ubuntu-latest | ||
needs: [golangci-lint, go-test, go-test-integration, go-bench, go-mod] | ||
# For now, we only auto approve and merge provider release PRs created by mondoo-tools. | ||
# We have to check the commit author, because the PR is created by "github-actions[bot]" | ||
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#startswith | ||
if: ${{ startsWith(github.ref, 'refs/heads/version/providers_update_') && github.event.commits[0].author.username == 'mondoo-tools' }} | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
# figure out the PR for this commit | ||
- uses: cloudposse-github-actions/[email protected] | ||
id: pr | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
filterOutClosed: true | ||
filterOutDraft: true | ||
- name: Approve a PR | ||
uses: fastify/github-action-merge-dependabot@v3 | ||
with: | ||
pr-number: ${{ steps.pr.outputs.number }} | ||
|
||
event_file: | ||
name: "Store event file" | ||
|