feat: update AWS deploy workflow to trigger on Docker test completion… #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Docker Containerization | |
on: [push] | |
env: | |
ECR_REPOSITORY_BACKEND: atlas-backend | |
ECR_REPOSITORY_FRONTEND: atlas-frontend | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
frontend-container: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build, tag, and push frontend image to Amazon ECR | |
id: build-front-image | |
env: | |
ECR_REGISTRY: atlas-ecr-registry | |
IMAGE_TAG: ${{ github.sha }} | |
run: | | |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY_FRONTEND:$IMAGE_TAG -f Dockerfile.client . | |
docker push $ECR_REGISTRY/$ECR_REPOSITORY_FRONTEND:$IMAGE_TAG | |
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY_FRONTEND:$IMAGE_TAG" >> $GITHUB_OUTPUT | |
backend-container: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build, tag, and push backend image to Amazon ECR | |
id: build-backend-image | |
env: | |
ECR_REGISTRY: atlas-ecr-registry | |
IMAGE_TAG: ${{ github.sha }} | |
run: | | |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY_BACKEND:$IMAGE_TAG -f Dockerfile.server . | |
docker push $ECR_REGISTRY/$ECR_REPOSITORY_BACKEND:$IMAGE_TAG | |
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY_BACKEND:$IMAGE_TAG" >> $GITHUB_OUTPUT |