diff --git a/provider-ci/internal/pkg/generate.go b/provider-ci/internal/pkg/generate.go index 8211e7df9..92a903080 100644 --- a/provider-ci/internal/pkg/generate.go +++ b/provider-ci/internal/pkg/generate.go @@ -101,7 +101,7 @@ func getTemplateDirs(templateName string) ([]string, error) { return []string{"dev-container", "provider", "pulumi-provider", "bridged-provider"}, nil case "external-bridged-provider": // Render more specific templates last to allow them to override more general templates. - return []string{"dev-container", "provider", "bridged-provider"}, nil + return []string{"dev-container", "provider", "external-provider", "bridged-provider"}, nil default: return nil, fmt.Errorf("unknown template: %s", templateName) } @@ -119,7 +119,6 @@ func getDeletedFiles(templateName string) []string { } case "external-bridged-provider": return []string{ - ".github/workflows/resync-build.yml", "scripts/upstream.sh", ".goreleaser.yml", ".goreleaser.prerelease.yml", diff --git a/provider-ci/internal/pkg/templates/external-provider/.github/workflows/resync-build.yml b/provider-ci/internal/pkg/templates/external-provider/.github/workflows/resync-build.yml new file mode 100644 index 000000000..12afb8877 --- /dev/null +++ b/provider-ci/internal/pkg/templates/external-provider/.github/workflows/resync-build.yml @@ -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/create-pull-request@v3.12.0 + with: + author: pulumi-bot + 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 + labels: impact/no-changelog-required + title: Regenerate Github Actions workflows for pulumi-#{{ .Config.Provider }}# + token: ${{ env.GITHUB_TOKEN }} diff --git a/provider-ci/test-providers/acme/.github/workflows/resync-build.yml b/provider-ci/test-providers/acme/.github/workflows/resync-build.yml new file mode 100644 index 000000000..c83f4400e --- /dev/null +++ b/provider-ci/test-providers/acme/.github/workflows/resync-build.yml @@ -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/create-pull-request@v3.12.0 + with: + author: pulumi-bot + 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 + labels: impact/no-changelog-required + title: Regenerate Github Actions workflows for pulumi-acme + token: ${{ env.GITHUB_TOKEN }}