-
Notifications
You must be signed in to change notification settings - Fork 187
32 lines (32 loc) · 1.11 KB
/
deploy-pma.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Deploy PMA
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.CI_CD_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.CI_CD_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build and Push PMA image
uses: docker/build-push-action@v6
with:
push: true
context: ./docker
file: ./docker/Dockerfile.pma
tags: |
${{ steps.login-ecr.outputs.registry }}/wca-on-rails:pma
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Deploy new PMA Image
run: |
aws ecs update-service --cluster wca-on-rails --service wca-on-rails-prod-auxiliary-services --force-new-deployment