We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b768858 commit 2ae8c15Copy full SHA for 2ae8c15
.github/workflows/aws.yml
@@ -27,8 +27,8 @@
27
name: Publish to Amazon ECR
28
29
on:
30
- push:
31
- branches: [ "main" ]
+ release:
+ types: [released]
32
33
env:
34
AWS_REGION: us-east-1 # set this to your preferred AWS region, e.g. us-west-1
@@ -67,9 +67,10 @@ jobs:
67
68
- name: Build, tag, and push image to Amazon ECR
69
id: build-image
70
+ if: github.ref_type == 'tag'
71
72
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
- IMAGE_TAG: ${{ github.sha }}
73
+ IMAGE_TAG: ${{ github.ref_name }}
74
run: |
75
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
76
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
0 commit comments