resource-provider #1397
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env: | |
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} | |
PROVIDER_CATEGORY: ${{ github.event.client_payload.category }} | |
PROVIDER_DISPLAY_NAME: ${{ github.event.client_payload.display-name }} | |
PROVIDER_IS_COMPONENT: false | |
PROVIDER_NAME: ${{ github.event.client_payload.project }} | |
PROVIDER_SCHEMA_PATH: ${{ github.event.client_payload.schema-path }} | |
PROVIDER_SHORT_NAME: ${{ github.event.client_payload.project-shortname }} | |
PROVIDER_PUBLISHER_NAME: ${{ github.event.client_payload.publisher }} | |
PROVIDER_VERSION: ${{ github.event.client_payload.ref }} | |
name: provider docs build | |
on: | |
repository_dispatch: | |
types: | |
- resource-provider | |
jobs: | |
build-resource-provider-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "Building ${{ env.PROVIDER_NAME }} docs @ ${{ env.PROVIDER_VERSION }}" | |
- name: checkout registry repo | |
uses: actions/checkout@v2 | |
- name: Install Registrygen CLI | |
uses: jaxxstorm/[email protected] | |
with: | |
repo: pulumi/registrygen | |
- name: Generate Package Metadata | |
run: | | |
registrygen metadata --providerName=${{ env.PROVIDER_SHORT_NAME }} --repoSlug pulumi/pulumi-${{ env.PROVIDER_SHORT_NAME }} --schemaFile="${{ env.PROVIDER_SCHEMA_PATH }}" --version="${{ env.PROVIDER_VERSION }}" --publisher Pulumi | |
- name: git status | |
run: git status && git diff | |
- name: Create registry PR | |
id: create-pr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.PULUMI_BOT_TOKEN }} | |
committer: Pulumi Bot <[email protected]> | |
author: Pulumi Bot <[email protected]> | |
commit-message: "Publish Package Metadata for ${{ env.PROVIDER_SHORT_NAME }}@${{ env.PROVIDER_VERSION }}" | |
title: "Publish Package Metadata ${{ env.PROVIDER_SHORT_NAME }}@${{ env.PROVIDER_VERSION }}" | |
body: "" | |
branch: "${{ env.PROVIDER_SHORT_NAME }}/${{ github.run_id }}-${{ github.run_number }}" | |
- if: steps.create-pr.outputs.pull-request-operation == 'created' | |
name: Set Automerge | |
uses: peter-evans/enable-pull-request-automerge@v3 | |
with: | |
merge-method: squash | |
pull-request-number: ${{ steps.create-pr.outputs.pull-request-number }} | |
repository: ${{ github.repository }} | |
token: ${{ secrets.PULUMI_BOT_TOKEN }} | |
notify: | |
if: failure() | |
name: Send slack notification | |
runs-on: ubuntu-latest | |
needs: [build-resource-provider-docs] | |
steps: | |
- name: Slack Notification | |
uses: docker://sholung/action-slack-notify:v2.3.0 | |
env: | |
SLACK_CHANNEL: docs-ops | |
SLACK_COLOR: "#F54242" | |
SLACK_MESSAGE: "provider docs build failure in pulumi/registry repo :meow_sad:" | |
SLACK_USERNAME: registrybot | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_ICON: https://www.pulumi.com/logos/brand/avatar-on-white.png |