Skip to content

Commit a622c2d

Browse files
authored
Update push-ecr.yaml
1 parent 573aa65 commit a622c2d

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

.github/workflows/push-ecr.yaml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ on:
99
workflow_dispatch:
1010
inputs:
1111
image_tag_version:
12-
description: 'Version to tag the Docker image'
12+
description: 'Version to tag the Docker image ()'
13+
required: true
14+
type: string
15+
ecr_repository:
16+
description: 'ECR repository name (dev-zebra-server)'
1317
required: false
1418
type: string
1519

1620
env:
1721
AWS_REGION: ${{ vars.AWS_REGION || 'eu-central-1' }}
18-
ECR_REPOSITORY: ${{ vars.ECR_REPOSITORY || 'dev-zebra-server' }}
22+
ECR_REPOSITORY: ${{ inputs.ecr_repository || vars.ECR_REPOSITORY || 'dev-zebra-server' }}
1923
DOCKERFILE_PATH: ${{ vars.DOCKERFILE_PATH }}
2024

2125
jobs:
@@ -62,14 +66,6 @@ jobs:
6266
# Set the input IMAGE_TAG_VERSION
6367
echo "IMAGE_TAG_VERSION=${{ github.event.inputs.image_tag_version }}" >> $GITHUB_ENV
6468
echo " User-provided IMAGE_TAG_VERSION: ${{ github.event.inputs.image_tag_version }}"
65-
66-
- name: Print run information
67-
run: |
68-
echo "Branch/Ref: ${{ github.ref_name }}"
69-
echo "Full Ref: ${{ github.ref }}"
70-
echo "Event: ${{ github.event_name }}"
71-
echo "Inputs:"
72-
echo " image_tag_version: ${{ github.event.inputs.image_tag_version || '(not set)' }}"
7369
7470
- name: Build, tag, and push image to Amazon ECR
7571
id: build-image
@@ -138,9 +134,10 @@ jobs:
138134
echo "image_exact_tag=$ECR_REGISTRY/$ECR_REPOSITORY:$GIT_TAG" >> $GITHUB_OUTPUT
139135
fi
140136
141-
# Print the public repository URL
142137
echo ""
143138
echo "====================================="
144-
echo "Public ECR Repository URL:"
145-
echo "https://gallery.ecr.aws/$ECR_REPOSITORY"
139+
echo "Successfully pushed to ECR:"
140+
echo " Registry: $ECR_REGISTRY"
141+
echo " Repository: $ECR_REPOSITORY"
142+
echo " Tags: $IMAGE_TAG_LATEST ${IMAGE_TAG_VERSION:+$IMAGE_TAG_VERSION }${GIT_TAG:+$GIT_TAG}"
146143
echo "====================================="

0 commit comments

Comments
 (0)