File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,21 +31,26 @@ jobs:
3131 id : get_version
3232 run : |
3333 VERSION=$(cat version)
34+ echo "Version: $VERSION"
3435 echo "VERSION=$VERSION" >> $GITHUB_ENV
3536
3637 - name : Check if version exists in ECR
3738 run : |
38- if aws ecr describe-images \
39+ TAGS=$( aws ecr describe-images \
3940 --repository-name asyncdb \
4041 --image-ids imageTag=$VERSION \
4142 --region eu-west-2 \
4243 --query 'imageDetails[0].imageTags[0]' \
43- --output text 2>/dev/null | grep -q "$VERSION"; then
44+ --output text 2>/dev/null)
45+
46+ echo "Tags: $TAGS"
47+
48+ if echo $TAGS | grep -q "$VERSION"; then
4449 echo "Image version $VERSION already exists in ECR."
50+ echo "publish=false" >> $GITHUB_OUTPUT
51+ else
4552 echo "publish=true" >> $GITHUB_OUTPUT
46- else
47- echo "publish=false" >> $GITHUB_OUTPUT
48- fi
53+ fi
4954 env :
5055 AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
5156 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Original file line number Diff line number Diff line change 1- 0.0.1
1+ 0.0.2
You can’t perform that action at this time.
0 commit comments