Update GH workflows, ecosystem providers #1269
This file contains hidden or 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
| permissions: write-all # Equivalent to default permissions plus id-token: write | |
| # This is the version of update-workflows-bridged-providers.yml scoped down to Ecosystem team owned providers. | |
| # | |
| # Generates a PR for the files in provider-ci/providers/* to each corresponding Pulumi provider. | |
| # | |
| # Note that this workflow does not generate any files - workflows must already be generated and committed to this repo | |
| # when this workflow is run. | |
| name: Update GH workflows, ecosystem providers | |
| on: | |
| schedule: | |
| # 5 AM UTC ~ 10 PM PDT - specifically selected to avoid putting load on the CI system during working hours. | |
| - cron: 0 5 * * * | |
| workflow_dispatch: | |
| inputs: | |
| automerge: | |
| description: Mark created PRs for auto-merging? | |
| required: true | |
| type: boolean | |
| default: true | |
| env: | |
| ESC_ACTION_OIDC_AUTH: true | |
| ESC_ACTION_OIDC_ORGANIZATION: pulumi | |
| ESC_ACTION_OIDC_REQUESTED_TOKEN_TYPE: urn:pulumi:token-type:access_token:organization | |
| ESC_ACTION_ENVIRONMENT: github-secrets/pulumi-ci-mgmt | |
| ESC_ACTION_EXPORT_ENVIRONMENT_VARIABLES: GITHUB_TOKEN=PULUMI_BOT_TOKEN | |
| jobs: | |
| generate-providers-list: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Fetch secrets from ESC | |
| id: esc-secrets | |
| uses: pulumi/esc-action@3af4859af8a73a362fb599b944124097d4bb80c5 # v3 | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - id: get-providers | |
| run: echo "providers=$(jq . providers.json --compact-output)" >> "$GITHUB_OUTPUT" | |
| working-directory: provider-ci | |
| outputs: | |
| providers: ${{ steps.get-providers.outputs.providers }} | |
| deploy: | |
| needs: generate-providers-list | |
| strategy: | |
| fail-fast: false | |
| # GitHub recommends only issuing 1 API request per second, and never | |
| # concurrently. For more information, see: | |
| # https://docs.github.com/en/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits | |
| max-parallel: 1 | |
| matrix: | |
| provider: ${{ fromJson(needs.generate-providers-list.outputs.providers ) }} | |
| uses: ./.github/workflows/update-workflows.yml | |
| secrets: inherit | |
| with: | |
| provider_name: ${{ matrix.provider }} | |
| automerge: ${{ github.event.inputs.automerge == 'true' || github.event_name == 'schedule' }} | |
| caller_workflow: update-workflows-ecosystem-providers | |
| called_by: "@${{ github.actor }}" |