-
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.
Merge pull request #104 from remerge/CORE-280
Add improved deployment notification workflow
- Loading branch information
Showing
4 changed files
with
105 additions
and
10 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,48 @@ | ||
--- | ||
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: | ||
slack-token: | ||
required: true | ||
description: "Slack token for posting messages" | ||
|
||
outputs: | ||
github-deployment-id: | ||
description: "GitHub deployment ID" | ||
value: ${{ jobs.deployment-start.outputs.github-deployment-id }} | ||
|
||
slack-thread-ts: | ||
description: "Slack thread timestamp" | ||
value: ${{ jobs.deployment-start.outputs.slack-thread-ts }} | ||
|
||
jobs: | ||
deployment-start: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
slack-thread-ts: ${{ steps.slack.outputs.ts }} | ||
github-deployment-id: ${{ steps.github.outputs.deployment_id }} | ||
steps: | ||
- id: slack | ||
uses: remerge/action-slack-deploy-pipeline@f21c7c7 | ||
with: | ||
token: ${{ secrets.slack-token }} | ||
channel: ${{ inputs.slack-channel }} | ||
|
||
- id: github | ||
uses: chrnorm/deployment-action@v2 | ||
with: | ||
token: ${{ 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,49 @@ | ||
--- | ||
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: | ||
slack-token: | ||
required: true | ||
description: "Slack token for posting messages" | ||
|
||
jobs: | ||
deployment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: slack | ||
uses: remerge/action-slack-deploy-pipeline@f21c7c7 | ||
with: | ||
token: ${{ secrets.slack-token }} | ||
channel: ${{ inputs.slack-channel }} | ||
thread_ts: ${{ inputs.slack-thread-ts }} | ||
conclusion: true | ||
|
||
- id: github | ||
uses: chrnorm/deployment-status@v2 | ||
with: | ||
token: ${{ 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