Skip to content

Commit a4b3388

Browse files
committed
chore: fetch version via grep + change versionning format
1 parent e053b2b commit a4b3388

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/ecr-release.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: ecr-release.yml
22
on:
33
release:
44
types: [published]
5+
push:
6+
branches: [feat/publish-emulator-image]
57

68
permissions:
79
contents: read
@@ -46,13 +48,10 @@ jobs:
4648
python -m pip install virtualenv==20.39.0
4749
- name: Build distribution
4850
run: hatch build
49-
- name: pip install
50-
run: |
51-
pip install -e .
5251
- name: Get version from __about__.py
5352
id: version
5453
run: |
55-
VERSION=$(python -c "from aws_durable_execution_sdk_python_testing import __version__; print(__version__)")
54+
VERSION=$(grep "^__version__" src/aws_durable_execution_sdk_python_testing/__about__.py | cut -d'"' -f2)
5655
echo "VERSION=$VERSION"
5756
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
5857
- name: Configure AWS Credentials
@@ -71,8 +70,8 @@ jobs:
7170
env:
7271
ECR_REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
7372
ECR_REPOSITORY: ${{ env.ecr_repository_name }}
74-
IMAGE_TAG: "${{ env.image_tag }}v${{ steps.version.outputs.VERSION }}"
75-
PER_ARCH_IMAGE_TAG: "${{ matrix.arch }}v${{ steps.version.outputs.VERSION }}"
73+
IMAGE_TAG: "v${{ steps.version.outputs.VERSION }}-${{ env.image_tag }}"
74+
PER_ARCH_IMAGE_TAG: "v${{ steps.version.outputs.VERSION }}-${{ matrix.arch }}"
7675
run: |
7776
if [ "${{ matrix.arch }}" = "x86_64" ]; then
7877
docker build --platform linux/amd64 --provenance false "${{ env.docker_build_dir }}" -f "${{ env.path_to_dockerfile }}" -t "$ECR_REGISTRY/$ECR_REPOSITORY:$PER_ARCH_IMAGE_TAG"

0 commit comments

Comments
 (0)