Skip to content

Release

Release #11

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
git_commit:
description: 'Short Git commit hash to deploy to production'
required: true
jobs:
release:
name: release
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
GIT_COMMIT: ${{ github.event.inputs.git_commit }}
DB_SETTINGS_BUCKET: districtbuilder-production-config-us-east-1
DB_DEPLOYMENT_ENVIRONMENT: "production"
NODE_ENV: production
DB_ROLLBAR_ACCESS_TOKEN: ${{ secrets.DB_ROLLBAR_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: "us-east-1"
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: district-builder
SLACK_MESSAGE: 'deploying revision https://github.com/publicmapping/districtbuilder/tree/${{ github.event.inputs.git_commit }} to *production*'
SLACK_TITLE: Deploying
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
- run: |
docker-compose -f docker-compose.yml -f docker-compose.ci.yml run --rm terraform -c "
unset AWS_PROFILE
./scripts/infra plan
./scripts/infra apply"