-
Notifications
You must be signed in to change notification settings - Fork 119
53 lines (50 loc) · 2.13 KB
/
publish-provider-update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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@v4
- name: Generate Package Metadata
run: |
go build -C tools/resourcedocsgen
./tools/resourcedocsgen/resourcedocsgen \
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
uses: ./.github/actions/new-provider-version-pr
with:
github_token: ${{ secrets.PULUMI_BOT_TOKEN }}
provider_short_name: ${{ env.PROVIDER_SHORT_NAME }}
provider_version: ${{ env.PROVIDER_VERSION }}
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