Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test dispatch schema to pulumi/pulumi-sdk repo #344

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/dispatch_build_sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: dispatch-build-sdk
on:
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]' }}

dispatch_sdk_build:
needs: prerequisites
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Checkout central SDK repo
uses: actions/checkout@v4
with:
repository: pulumi/pulumi-sdk
ref: main
path: pulumi-sdk
token: ${{ secrets.PULUMI_BOT_TOKEN }}
- 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 }}"
Loading