-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23513 from hashicorp/f/automation-changes
automation: opening a PR when a branch named `auto-pr/deps/updating-go-azure-sdk-to-{version}` is pushed
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
.github/workflows/automation-open-pull-request-go-sdk.yaml
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,30 @@ | ||
--- | ||
name: Open Pull Request when an `auto-pr` is pushed for go-azure-sdk | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'auto-pr/deps/updating-go-azure-sdk-to-**' | ||
|
||
jobs: | ||
open-pull-request: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
|
||
- name: "open a pull request" | ||
id: open-pr | ||
run: | | ||
version="$(echo {{ github.ref_name }} | sed "s/auto-pr\/deps\/updating-go-azure-sdk-to-//")" | ||
title="dependencies: updating `hashicorp/go-azure-sdk` to `${version}`" | ||
# this runs everytime the PR gets pushed too, whilst you can only create a PR a single time | ||
# so we should be smarter, but piping this to /dev/null is a fine workaround for MVP | ||
gh pr create --title "$title" --body "$PR_BODY" -B "$PR_TARGET" > /dev/null | ||
env: | ||
PR_BODY: "This PR updates `hashicorp/go-azure-sdk` - further details can be found in a comment." | ||
PR_TARGET: "main" | ||
GH_TOKEN: ${{ secrets.SERVICE_ACCOUNT_TERRAFORM_TOKEN }} |
4 changes: 3 additions & 1 deletion
4
...rkflows/automation-open-pull-request.yaml → ...automation-open-pull-request-pandora.yaml
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