Skip to content

Commit

Permalink
Merge pull request #4757 from Expensify/cmartins-slack-message
Browse files Browse the repository at this point in the history
[No QA] Post deploy announcements in slack
  • Loading branch information
Julesssss authored Aug 23, 2021
2 parents bdcafa3 + 241b4ac commit f442577
Showing 1 changed file with 33 additions and 6 deletions.
39 changes: 33 additions & 6 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,6 @@ jobs:
with:
node-version: '14.x'

- name: Determine if this was a cherry-pick
id: isStagingDeployLocked
uses: Expensify/App/.github/actions/isStagingDeployLocked@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set version
run: echo "VERSION=$(npm run print-version --silent)" >> $GITHUB_ENV

Expand All @@ -358,3 +352,36 @@ jobs:
DESKTOP: ${{ needs.desktop.result }}
IOS: ${{ needs.iOS.result }}
WEB: ${{ needs.web.result }}

- name: 'Announces the deploy in the #announce Slack room'
uses: 8398a7/action-slack@v3
with:
status: custom
custom_payload: |
{
channel: '#announce',
attachments: [{
color: 'good',
text: `Successfully deployed ${process.env.AS_REPO} v${{ env.VERSION }} to ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' ? 'production' : 'staging' }}.`,
}]
}
env:
GITHUB_TOKEN: ${{ github.token }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

- name: 'Announces a production deploy in the #expensify-open-source Slack room'
uses: 8398a7/action-slack@v3
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
with:
status: custom
custom_payload: |
{
channel: '#expensify-open-source',
attachments: [{
color: 'good',
text: `Successfully deployed ${process.env.AS_REPO} v${{ env.VERSION }} to production.`,
}]
}
env:
GITHUB_TOKEN: ${{ github.token }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

0 comments on commit f442577

Please sign in to comment.