release-command #18
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
# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt | |
name: release-command | |
on: | |
repository_dispatch: | |
types: | |
- release-command | |
jobs: | |
should_release: | |
name: Should release PR | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Should release PR | |
uses: pulumi/action-release-by-pr-label@main | |
with: | |
command: "should-release" | |
repo: ${{ github.repository }} | |
pr: ${{ github.event.client_payload.pull_request.number }} | |
version: ${{ github.event.client_payload.slash_command.args.all }} | |
slack_channel: ${{ secrets.RELEASE_OPS_STAGING_SLACK_CHANNEL }} | |
env: | |
RELEASE_BOT_ENDPOINT: ${{ secrets.RELEASE_BOT_ENDPOINT }} | |
RELEASE_BOT_KEY: ${{ secrets.RELEASE_BOT_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- if: failure() | |
name: Notify failure | |
uses: peter-evans/create-or-update-comment@v2 | |
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: | | |
"release command failed: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
- if: success() | |
name: Notify success | |
uses: peter-evans/create-or-update-comment@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | |
reaction-type: hooray |