Skip to content

Commit

Permalink
Simplify deployment notification jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
hollow committed Aug 16, 2024
1 parent b21f27c commit bd05d3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/deployment-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,25 @@ on:
outputs:
github-deployment-id:
description: "GitHub deployment ID"
value: ${{ jobs.github.outputs.id }}
value: ${{ jobs.deployment-start.outputs.github-deployment-id }}

slack-thread-ts:
description: "Slack thread timestamp"
value: ${{ jobs.slack.outputs.ts }}
value: ${{ jobs.deployment-start.outputs.slack-thread-ts }}

jobs:
slack:
deployment-start:
runs-on: ubuntu-latest
outputs:
ts: ${{ steps.slack.outputs.ts }}
slack-thread-ts: ${{ steps.slack.outputs.ts }}
github-deployment-id: ${{ steps.github.outputs.deployment_id }}
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:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:
description: "Slack token for posting messages"

jobs:
slack:
deployment:
runs-on: ubuntu-latest
steps:
- id: slack
Expand All @@ -41,9 +41,6 @@ jobs:
thread_ts: ${{ inputs.slack-thread-ts }}
conclusion: true

github:
runs-on: ubuntu-latest
steps:
- id: github
uses: chrnorm/deployment-status@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
parent: false

- uses: hollow/action-slack-deploy-pipeline@CORE-280
if: ${{ always() && inputs.slack-channel }}
if: ${{ always() && inputs.slack-thread-ts }}
with:
token: ${{ secrets.slack-token }}
channel: ${{ inputs.slack-channel }}
Expand Down

0 comments on commit bd05d3c

Please sign in to comment.