Skip to content

Commit

Permalink
chore(ci): add workflow that triggers upgrade-main in all provider repos
Browse files Browse the repository at this point in the history
  • Loading branch information
xiehan authored Jan 14, 2025
1 parent 2de258c commit 3d881cb
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/upgrade-main-providers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "upgrade-main in all provider repos"
on:
workflow_dispatch: {}
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
build-provider-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- id: set-matrix
run: |
provider=$(jq -rcM "{ provider: keys }" provider.json)
echo "matrix=$provider" >> $GITHUB_OUTPUT
upgrade-main:
needs: build-provider-matrix
name: "Trigger upgrade-main"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{fromJSON(needs.build-provider-matrix.outputs.matrix)}}
max-parallel: 10
steps:
- name: Trigger the upgrade-main workflow
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.GH_COMMENT_TOKEN }}
script: |
await github.rest.actions.createworkflowDispatch({
owner: "cdktf",
repo: "cdktf-provider-${{ matrix.provider }}",
workflow_id: "upgrade-main.yml",
ref: "main"
})

0 comments on commit 3d881cb

Please sign in to comment.