Skip to content

Commit

Permalink
Run migrations as part of update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
blampe committed Dec 19, 2024
1 parent b9e1a2c commit 77f5bc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/test-provider-ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Test Provider CI
on:
pull_request:
branches:
- master
pull_request: {}
merge_group: {}
workflow_dispatch: {}

Expand Down Expand Up @@ -43,6 +41,7 @@ jobs:
downstream_test: true
skip_closing_prs: true
caller_workflow: "pull-request"
ci-mgmt-ref: ${{ github.event.pull_request.head.sha || 'master' }}

downstream:
name: Test xyz
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/update-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ on:
description: "Whether to skip closing PRs"
type: boolean
default: false
ci-mgmt-ref:
description: The revision of ci-mgmt to use for workflows.
type: string
default: "master"
outputs:
pull_request_created:
value: ${{ jobs.update_workflows.outputs.pull_request_created }}
Expand Down Expand Up @@ -58,6 +62,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
path: ci-mgmt
ref: ${{ inputs.ci-mgmt-ref }}
- name: Clone pulumi-${{ inputs.provider_name }}
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
Expand All @@ -76,7 +81,7 @@ jobs:
rm pulumi-${{ inputs.provider_name }}/.github/workflows/master.yml || echo "not found"
- name: Generate workflow files into pulumi-${{ inputs.provider_name }}
if: inputs.bridged
run: go run github.com/pulumi/ci-mgmt/provider-ci@${{ github.sha }} generate
run: go run github.com/pulumi/ci-mgmt/provider-ci@${{ inputs.ci-mgmt-ref }} generate
shell: bash
working-directory: pulumi-${{ inputs.provider_name }}
- name: Copy files from ci-mgmt to pulumi-${{ inputs.provider_name }}
Expand Down

0 comments on commit 77f5bc6

Please sign in to comment.