Skip to content

Commit

Permalink
Publish to ECR
Browse files Browse the repository at this point in the history
  • Loading branch information
vgottipa committed Mar 18, 2024
1 parent 05cedf3 commit 143e112
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: Docker Image CI ( Dockerhub and ECR )
name: Docker Image Publish CI ( Dockerhub and ECR )

on:
push:
tags:
- '*'
branches: [ "master" ]
pull_request:
branches: [ "master" ]
release:
types: [created]

jobs:
build:
Expand All @@ -22,11 +18,7 @@ jobs:
- name: Set version
id: version
run: |
if [ "${{ steps.tag_type.outputs.is_release_tag }}" == "false" ]; then
echo "VERSION=v1.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand Down Expand Up @@ -55,17 +47,13 @@ jobs:
- name: Set version
id: version
run: |
if [ "${{ steps.tag_type.outputs.is_release_tag }}" == "false" ]; then
echo "VERSION=v1.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi
- name: Setup AWS ECR Details
uses: aws-actions/configure-aws-credentials@v3
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
aws-region: us-east-1

- name: Login to Amazon ECR
id: login-pf-aws-ecr
Expand Down

0 comments on commit 143e112

Please sign in to comment.