-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add improved deployment notification workflow
- Loading branch information
Showing
4 changed files
with
118 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
name: deployment-start | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
github-environment: | ||
type: string | ||
required: true | ||
description: "GitHub environment to deploy to" | ||
|
||
slack-channel: | ||
type: string | ||
required: true | ||
description: "Slack channel to post to" | ||
|
||
secrets: | ||
github-token: | ||
required: true | ||
description: "GitHub token for deployments" | ||
|
||
slack-token: | ||
required: true | ||
description: "Slack token for posting messages" | ||
|
||
outputs: | ||
github-deployment-id: | ||
description: "GitHub deployment ID" | ||
value: ${{ jobs.github.outputs.id }} | ||
|
||
slack-thread-ts: | ||
description: "Slack thread timestamp" | ||
value: ${{ jobs.slack.outputs.ts }} | ||
|
||
jobs: | ||
slack: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
ts: ${{ steps.slack.outputs.ts }} | ||
steps: | ||
- id: slack | ||
uses: hollow/action-slack-deploy-pipeline@CORE-280 | ||
with: | ||
token: ${{ secrets.slack-token }} | ||
channel: ${{ inputs.slack-channel }} | ||
|
||
github: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
id: ${{ steps.github.outputs.deployment_id }} | ||
steps: | ||
- id: github | ||
uses: chrnorm/deployment-action@v2 | ||
with: | ||
token: ${{ secrets.github-token }} | ||
environment: ${{ inputs.github-environment }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
name: deployment-start | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
github-deployment-id: | ||
type: string | ||
required: true | ||
description: "GitHub environment to deploy to" | ||
|
||
github-deployment-state: | ||
type: string | ||
description: "GitHub deployment state" | ||
default: "success" | ||
|
||
slack-channel: | ||
type: string | ||
required: true | ||
description: "Slack channel to post to" | ||
|
||
slack-thread-ts: | ||
type: string | ||
required: false | ||
description: "Slack thread timestamp" | ||
|
||
secrets: | ||
github-token: | ||
required: true | ||
description: "GitHub token for deployments" | ||
|
||
slack-token: | ||
required: true | ||
description: "Slack token for posting messages" | ||
|
||
jobs: | ||
slack: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: slack | ||
uses: hollow/action-slack-deploy-pipeline@CORE-280 | ||
with: | ||
token: ${{ secrets.slack-token }} | ||
channel: ${{ inputs.slack-channel }} | ||
thread_ts: ${{ inputs.slack-thread-ts }} | ||
conclusion: true | ||
|
||
github: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: github | ||
uses: chrnorm/deployment-status@v2 | ||
with: | ||
token: ${{ secrets.github-token }} | ||
deployment-id: ${{ inputs.github-deployment-id }} | ||
state: ${{ inputs.github-deployment-state }} |
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
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