Skip to content

chore(release): bump version to v5.21.7 #2929

chore(release): bump version to v5.21.7

chore(release): bump version to v5.21.7 #2929

Workflow file for this run

name: Deploy
on:
pull_request:
branches:
- main
- master
- develop
types:
- closed
concurrency:
group: ${{ github.workflow }}-${{ github.base_ref }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
jobs:
# Prepare artifacts
build:
if: github.event.pull_request.merged == true
uses: ./.github/workflows/build.yml
with:
environment: ${{ github.base_ref == 'develop' && 'develop' || 'production' }}
skip_tests: true
skip_docker: false
secrets:
AWS_REGION: ${{ github.base_ref == 'develop' && secrets.AWS_REGION_DEV || secrets.AWS_REGION_PROD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# Run database migrations
migrate-db-develop:
needs: build
if: github.event.pull_request.merged == true && github.base_ref == 'develop'
uses: ./.github/workflows/db-migration.yml
with:
environment: 'develop'
secrets:
MATTERS_PG_HOST: ${{ secrets.DEVELOP_PG_HOST }}
MATTERS_PG_DATABASE: ${{ secrets.DEVELOP_PG_DATABASE }}
MATTERS_PG_USER: ${{ secrets.DEVELOP_PG_USER }}
MATTERS_PG_PASSWORD: ${{ secrets.DEVELOP_PG_PASSWORD }}
MATTERS_STRIPE_SECRET: ${{ secrets.DEVELOP_STRIPE_SECRET }}
VPN_CONFIG: ${{ secrets.DEVELOP_VPN_CONFIG }}
VPN_AUTH: ${{ secrets.DEVELOP_VPN_AUTH }}
migrate-db-production:
needs: build
if: github.event.pull_request.merged == true && (github.base_ref == 'master' || github.base_ref == 'main')
uses: ./.github/workflows/db-migration.yml
with:
environment: 'production'
secrets:
MATTERS_PG_HOST: ${{ secrets.PROD_PG_HOST }}
MATTERS_PG_DATABASE: ${{ secrets.PROD_PG_DATABASE }}
MATTERS_PG_USER: ${{ secrets.PROD_PG_USER }}
MATTERS_PG_PASSWORD: ${{ secrets.PROD_PG_PASSWORD }}
MATTERS_STRIPE_SECRET: ${{ secrets.PROD_STRIPE_SECRET }}
VPN_CONFIG: ${{ secrets.VPN_CONFIG }}
VPN_AUTH: ${{ secrets.VPN_AUTH }}
# Deploy to Elastic Beanstalk
deploy-eb-develop:
needs: migrate-db-develop
if: github.event.pull_request.merged == true && github.base_ref == 'develop'
uses: ./.github/workflows/eb-deploy.yml
with:
environment: 'develop'
app_name: 'matters-stage'
image_tag: 'develop'
secrets:
AWS_REGION: ${{ secrets.AWS_REGION_DEV }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EB_ENV_NAME: ${{ secrets.AWS_EB_ENV_NAME_DEV }}
deploy-eb-production:
needs: migrate-db-production
if: github.event.pull_request.merged == true && (github.base_ref == 'master' || github.base_ref == 'main')
uses: ./.github/workflows/eb-deploy.yml
with:
environment: 'production'
app_name: 'matters-prod'
image_tag: 'prod'
secrets:
AWS_REGION: ${{ secrets.AWS_REGION_PROD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EB_ENV_NAME: ${{ secrets.AWS_EB_ENV_NAME_PROD }}
# Deploy Lambda
deploy-lambda-develop:
needs: migrate-db-develop
if: github.event.pull_request.merged == true && github.base_ref == 'develop'
uses: ./.github/workflows/lambda-deploy.yml
with:
environment: 'develop'
secrets:
AWS_REGION: ${{ secrets.AWS_REGION_DEV }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
deploy-lambda-production:
needs: migrate-db-production
if: github.event.pull_request.merged == true && (github.base_ref == 'master' || github.base_ref == 'main')
uses: ./.github/workflows/lambda-deploy.yml
with:
environment: 'production'
secrets:
AWS_REGION: ${{ secrets.AWS_REGION_PROD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
# Notify Slack
notify-develop:
needs: [build, migrate-db-develop, deploy-eb-develop, deploy-lambda-develop]
if: always() && github.event.pull_request.merged == true && github.base_ref == 'develop'
runs-on: ubuntu-latest
steps:
- name: Slack Notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: matters-server
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
notify-production:
needs: [build, migrate-db-production, deploy-eb-production, deploy-lambda-production]
if: always() && github.event.pull_request.merged == true && (github.base_ref == 'master' || github.base_ref == 'main')
runs-on: ubuntu-latest
steps:
- name: Slack Notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: matters-server
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took