v3.0.1 #28
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: Publish to AWS ECR | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
id: login-ecr | |
uses: aws-actions/configure-aws-credentials@v1 | |
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 | |
uses: aws-actions/amazon-ecr-login@v1 | |
with: | |
registry-type: public | |
- name: Promote alpha tag to latest, and push image to Amazon ECR | |
id: promote-image | |
env: | |
ECR_REGISTRY: public.ecr.aws/y6h0x1r3 | |
ECR_REPOSITORY: soos-dast | |
IMAGE_TAG_ALPHA: alpha | |
IMAGE_TAG: latest | |
run: | | |
docker pull $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG_ALPHA | |
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG_ALPHA $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | |
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG |