-
Notifications
You must be signed in to change notification settings - Fork 5
65 lines (62 loc) · 2.52 KB
/
update-bridge-ecosystem-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
53
54
55
56
57
58
59
60
61
62
63
64
65
# This is the version of update-bridge=all-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 bridge, ecosystem providers
on:
workflow_dispatch:
inputs:
automerge:
description: Mark created PRs for auto-merging?
required: true
type: boolean
default: false
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
jobs:
generate-providers-list:
runs-on: ubuntu-latest
steps:
- 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 }}
update-bridge:
needs: generate-providers-list
runs-on: ubuntu-latest
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 ) }}
steps:
- name: pulumi-${{ matrix.provider }} main
id: upgrade-on-main
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4
continue-on-error: true
with:
workflow: upgrade-bridge.yml
token: ${{ secrets.PULUMI_BOT_TOKEN }}
repo: pulumi/pulumi-${{ matrix.provider }}
inputs: '{ "automerge": true }'
ref: main
- name: pulumi-${{ matrix.provider }} master
id: upgrade-on-master
if: steps.upgrade-on-main.outcome == 'failure'
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4
with:
workflow: upgrade-bridge.yml
token: ${{ secrets.PULUMI_BOT_TOKEN }}
repo: pulumi/pulumi-${{ matrix.provider }}
ref: master
inputs: '{ "automerge": true }'
# See: https://docs.github.com/en/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits
- name: Sleep to prevent hitting secondary rate limits
run: sleep 1