pulumi/.github/workflows/pr-test-docs-generation-on-...

46 lines
1.5 KiB
YAML

name: Downstream Resource Docs Test
on:
repository_dispatch:
types: [ run-docs-gen ]
permissions:
contents: read
# Only the 'changelog-comment' job should use this permission.
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.client_payload.pull_request.number }}
cancel-in-progress: true
jobs:
comment-notification:
if: github.event_name == 'repository_dispatch'
runs-on: ubuntu-latest
steps:
- name: Create URL to the run output
id: vars
run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> "${GITHUB_OUTPUT}"
- name: Update with Result
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
issue-number: ${{ github.event.client_payload.github.payload.issue.number }}
body: |
Please view the results of the Docs Generation Tests [Here][1]
[1]: ${{ steps.vars.outputs.run-url }}
ci-docs-gen:
name: CI Codegen
if: github.event_name == 'pull_request'
uses: pulumi/pulumi./.github/workflows/ci-test-docs-generation.yml@master
permissions:
contents: read
with:
ref: refs/pull/${{ github.event.client_payload.pull_request.number }}/merge
pull_request_number: ${{ github.event.client_payload.pull_request.number }}
pull_request_author: ${{ github.event.client_payload.pull_request.user.login }}
secrets: inherit