Merge pull request #33 from The-Socialites/feature/landingPage #102
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: CD Pipeline | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
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: Login to Amazon ECR | |
run: aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 471112786669.dkr.ecr.us-east-1.amazonaws.com | |
- name: Build and Push Docker image for multiple platforms | |
run: | | |
export DOCKER_CLI_EXPERIMENTAL=enabled | |
docker buildx create --use --name mybuilder | |
docker buildx build --platform linux/amd64,linux/arm64 -t 471112786669.dkr.ecr.us-east-1.amazonaws.com/socialites-app01:latest --push . | |
docker buildx rm mybuilder | |