Skip to content

Commit

Permalink
Auto-run for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrbradley committed Aug 14, 2024
1 parent 37579b4 commit d16077d
Showing 1 changed file with 45 additions and 42 deletions.
87 changes: 45 additions & 42 deletions .github/workflows/dispatch_build_sdk.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,50 @@
name: dispatch-build-sdk
on:
workflow_dispatch: {}
workflow_dispatch: {}
pull_request:
branches:
- main

jobs:
prerequisites:
uses: ./.github/workflows/prerequisites.yml
secrets: inherit
with:
default_branch: ${{ github.event.repository.default_branch }}
is_pr: ${{ github.event_name == 'pull_request' }}
is_automated: ${{ github.actor == 'dependabot[bot]' }}
prerequisites:
uses: ./.github/workflows/prerequisites.yml
secrets: inherit
with:
default_branch: ${{ github.event.repository.default_branch }}
is_pr: ${{ github.event_name == 'pull_request' }}
is_automated: ${{ github.actor == 'dependabot[bot]' }}

dispatch_sdk_build:
needs: prerequisites
runs-on: ubuntu-latest
steps:
- name: Checkout central SDK repo
uses: actions/checkout@v4
with:
repository: pulumi/pulumi-sdk
ref: main
path: pulumi-sdk
- name: Download bin
uses: ./.github/actions/download-bin
- name: Extract schema from plugin binary
run: |
mkdir -p pulumi-sdk/xyz
pulumi package get-schema ./bin/pulumi-resource-xyz > pulumi-sdk/xyz/schema.json
- name: Create PR (no linked issue)
uses: peter-evans/[email protected]
id: cpr
with:
author: pulumi-bot <[email protected]>
base: main
body: This pull request was generated automatically by the dispatch-build-sdk workflow in the xyz repository.
branch: pulumi-bot/publish-sdk-xyz-${{ github.run_id}}
commit-message: Publish SDKs for pulumi-xyz
committer: pulumi-bot <[email protected]>
path: pulumi-sdk
labels: impact/no-changelog-required
title: Publish SDKs for pulumi-xyz version ${{ needs.prerequisites.outputs.version }}
token: ${{ secrets.PULUMI_BOT_TOKEN }}
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
dispatch_sdk_build:
needs: prerequisites
runs-on: ubuntu-latest
steps:
- name: Checkout central SDK repo
uses: actions/checkout@v4
with:
repository: pulumi/pulumi-sdk
ref: main
path: pulumi-sdk
- name: Download bin
uses: ./.github/actions/download-bin
- name: Extract schema from plugin binary
run: |
mkdir -p pulumi-sdk/xyz
pulumi package get-schema ./bin/pulumi-resource-xyz > pulumi-sdk/xyz/schema.json
- name: Create PR (no linked issue)
uses: peter-evans/[email protected]
id: cpr
with:
author: pulumi-bot <[email protected]>
base: main
body: This pull request was generated automatically by the dispatch-build-sdk workflow in the xyz repository.
branch: pulumi-bot/publish-sdk-xyz-${{ github.run_id}}
commit-message: Publish SDKs for pulumi-xyz
committer: pulumi-bot <[email protected]>
path: pulumi-sdk
labels: impact/no-changelog-required
title: Publish SDKs for pulumi-xyz version ${{ needs.prerequisites.outputs.version }}
token: ${{ secrets.PULUMI_BOT_TOKEN }}
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 comments on commit d16077d

Please sign in to comment.