Skip to content

Update GH workflows, ecosystem providers #884

Update GH workflows, ecosystem providers

Update GH workflows, ecosystem providers #884

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@cf5b30703ffd5ad60cc3a880c09b3a9592b9372d # v1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- 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