Skip to content

Commit

Permalink
Merge pull request #1563 from HDRUK/GAT-1887-PROD
Browse files Browse the repository at this point in the history
GAT-1887: Slack Channel notifications
  • Loading branch information
reubensamuel authored Feb 21, 2023
2 parents 23d430a + c294bd4 commit e191b64
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/prod_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
env:
PROJECT_ID: '${{ secrets.PROJECT_ID }}' # TODO: update Google Cloud project id.
GAR_LOCATION: '${{ secrets.GAR_LOCATION }}' # TODO: update Artifact Registry location
SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK_URL}}'
SLACK_CHANNEL: '${{ secrets.GITHUBACTIONS_SLACK_CHANNEL }}'

jobs: # Deployment please don't modify anything here as the infrastructure is controlled by terraform any changes here please agree with chris and reuben

Expand Down Expand Up @@ -43,7 +45,7 @@ jobs: # Deployment please don't modify anything here as the infrastructure
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: 'GAT Live Release - '${{ steps.getversion.outputs.version }}
automatic_release_tag: 'GAT Live Release - ''${{ steps.getversion.outputs.version }}'
prerelease: false

- name: Deploy to Cloud Run
Expand All @@ -60,4 +62,14 @@ jobs: # Deployment please don't modify anything here as the infrastructure
with:
# args: run services update '${{ env.SERVICE_NAME }}' --image='${{ env.GAR_LOCATION }}'-docker.pkg.dev/'${{ env.DEV_PROJECT_ID }}'/'${{ env.GAR_NAME }}'/${{ steps.getversion.outputs.version }}:${{ github.sha }} --region='${{ env.SERVICE_REGION }}' --project='${{ env.PROJECT_ID }}'
args: run services update '${{ env.SERVICE_NAME }}' --image='${{ env.GAR_LOCATION }}'-docker.pkg.dev/'${{ env.DEV_PROJECT_ID }}'/'${{ env.GAR_NAME }}'/${{ steps.getversion.outputs.version }}:latest --region='${{ env.SERVICE_REGION }}' --project='${{ env.PROJECT_ID }}'
# If required, use the Cloud Run url output in later steps
# If required, use the Cloud Run url output in later steps

- name: Deploy Notification
id: deploynotificationsent
uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
channel: ${{ env.SLACK_CHANNEL }}
message: Deploying {{ env.GITHUB_REF_NAME }} branch
if: always()

0 comments on commit e191b64

Please sign in to comment.