-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate workflows for external providers weekly (#1187)
Pulumi managed providers receive Github Actions workflow changes via a workflow run in `ci-mgmt`, with changes pushed to the provider repositories. External providers need a pull based model to take similar workflow changes in, hence the creation of the `external-provider` template folder and adding the required workflow in there. I tested the contents of the workflow standalone first on a single provider and it worked fine. Here was the generated PR to update the workflows: pulumiverse/pulumi-acme#93
- Loading branch information
Showing
3 changed files
with
83 additions
and
2 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
41 changes: 41 additions & 0 deletions
41
provider-ci/internal/pkg/templates/external-provider/.github/workflows/resync-build.yml
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,41 @@ | ||
# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt | ||
name: "Resync Build Workflows" | ||
|
||
on: | ||
schedule: | ||
# 3 AM UTC ~ 8 PM PDT / 7 PM PST every Tuesday. | ||
- cron: 0 3 * * TUE | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.PULUMI_PROVIDER_AUTOMATION_TOKEN || secrets.PULUMI_BOT_TOKEN || secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
upgrade_provider: | ||
name: pull-workflow-changes | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
# Persist credentials so pull-workflow-changes can push a new branch. | ||
persist-credentials: true | ||
- name: Regenerate the workflow files via https://github.com/pulumi/ci-mgmt | ||
run: | | ||
make ci-mgmt | ||
- name: Create PR (no linked issue) | ||
uses: peter-evans/[email protected] | ||
with: | ||
author: pulumi-bot <[email protected]> | ||
base: main | ||
body: This pull request was generated automatically by the resync-build workflow | ||
in this repository. | ||
branch: chore/resync-${{ github.run_id }} | ||
commit-message: Regenerate workflows for pulumi-#{{ .Config.Provider }}# | ||
committer: pulumi-bot <[email protected]> | ||
labels: impact/no-changelog-required | ||
title: Regenerate Github Actions workflows for pulumi-#{{ .Config.Provider }}# | ||
token: ${{ env.GITHUB_TOKEN }} |
41 changes: 41 additions & 0 deletions
41
provider-ci/test-providers/acme/.github/workflows/resync-build.yml
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,41 @@ | ||
# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt | ||
name: "Resync Build Workflows" | ||
|
||
on: | ||
schedule: | ||
# 3 AM UTC ~ 8 PM PDT / 7 PM PST every Tuesday. | ||
- cron: 0 3 * * TUE | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.PULUMI_PROVIDER_AUTOMATION_TOKEN || secrets.PULUMI_BOT_TOKEN || secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
upgrade_provider: | ||
name: pull-workflow-changes | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
# Persist credentials so pull-workflow-changes can push a new branch. | ||
persist-credentials: true | ||
- name: Regenerate the workflow files via https://github.com/pulumi/ci-mgmt | ||
run: | | ||
make ci-mgmt | ||
- name: Create PR (no linked issue) | ||
uses: peter-evans/[email protected] | ||
with: | ||
author: pulumi-bot <[email protected]> | ||
base: main | ||
body: This pull request was generated automatically by the resync-build workflow | ||
in this repository. | ||
branch: chore/resync-${{ github.run_id }} | ||
commit-message: Regenerate workflows for pulumi-acme | ||
committer: pulumi-bot <[email protected]> | ||
labels: impact/no-changelog-required | ||
title: Regenerate Github Actions workflows for pulumi-acme | ||
token: ${{ env.GITHUB_TOKEN }} |