Skip to content

Update Providers with new bridge version #17

Update Providers with new bridge version

Update Providers with new bridge version #17

name: Update Providers with new bridge version
on:
workflow_dispatch:
inputs:
bridgeVersion:
description: 'Version of Bridge to upgrade to'
required: true
automerge:
description: 'Whether to automerge the PRs'
type: boolean
default: false
required: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
generate-providers-list:
runs-on: ubuntu-latest
steps:
- id: get-providers
run: echo "providers=$(jq . <(curl https://raw.githubusercontent.com/pulumi/ci-mgmt/master/provider-ci/providers.json) --compact-output)" >> "$GITHUB_OUTPUT"
working-directory: provider-ci
outputs:
providers: ${{ steps.get-providers.outputs.providers }}
build:
runs-on: ubuntu-latest
name: Upgrade ${{ matrix.provider }} to pulumi-terraform-bridge ${{ github.event.inputs.bridgeVersion }}
steps:
- name: Trigger upgrade
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.PULUMI_BOT_TOKEN }}
repository: pulumi/pulumi-${{ matrix.provider }}
event-type: upgrade-bridge
client-payload: |-
{
"target-bridge-version": ${{ toJSON(github.event.inputs.bridgeVersion) }},
"pr-reviewers": ${{ toJSON( github.triggering_actor || 't0yv0' ) }},
"automerge": ${{ toJSON(github.event.inputs.automerge) }}
}
needs: generate-providers-list
strategy:
# 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 ) }}
fail-fast: false