-
Notifications
You must be signed in to change notification settings - Fork 43
52 lines (48 loc) · 1.83 KB
/
update-providers.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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