@@ -2,14 +2,16 @@ name: ecr-release.yml
22on :
33 release :
44 types : [published]
5+ push :
6+ branches : [feat/publish-emulator-image]
57
68permissions :
79 contents : read
810 id-token : write # This is required for requesting the JWT
911
1012env :
11- path_to_dockerfile : " emulator /DockerFile"
12- docker_build_dir : " emulator /"
13+ path_to_dockerfile : " /DockerFile"
14+ docker_build_dir : " /"
1315 aws_region : " us-east-1"
1416 ecr_repository_name : " o4w4w0v6/aws-durable-execution-emulator"
1517
@@ -26,12 +28,11 @@ jobs:
2628 - arch : x86_64
2729 - arch : arm64
2830 steps :
29- - name : Grab version from generate-version job
31+ - name : Get version from __about__.py
3032 id : version
31- env :
32- VERSION : $${{ github.event.release.name }}
3333 run : |
34- echo "$VERSION"
34+ VERSION=$(python -c "from src.aws_durable_execution_sdk_python_testing.__about__ import __version__; print(__version__)")
35+ echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
3536 - uses : actions/checkout@v6
3637 - name : Set up Python
3738 uses : actions/setup-python@v6
4748 uses : docker/setup-qemu-action@v3
4849 with :
4950 platforms : arm64
51+ - name : Build distribution
52+ run : hatch build
5053 - name : Configure AWS Credentials
5154 uses : aws-actions/configure-aws-credentials@v4
5255 with :
@@ -105,30 +108,30 @@ jobs:
105108 if : github.event.release.name != ''
106109 id : create-ecr-manifest-explicit
107110 run : |
108- docker manifest create "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ github.event.release.name }}" \
111+ docker manifest create "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ steps.version.outputs.VERSION }}" \
109112 "${{ needs.build-and-upload-image-to-ecr.outputs.full_image_x86_64 }}" \
110113 "${{ needs.build-and-upload-image-to-ecr.outputs.full_image_arm64 }}"
111114 - name : Annotate ECR manifest with explicit arm64 tag
112115 if : github.event.release.name != ''
113116 id : annotate-ecr-manifest-explicit-arm64
114117 run : |
115- docker manifest annotate "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ github.event.release.name }}" \
118+ docker manifest annotate "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ steps.version.outputs.VERSION }}" \
116119 "${{ needs.build-and-upload-image-to-ecr.outputs.full_image_arm64 }}" \
117120 --arch arm64 \
118121 --os linux
119122 - name : Annotate ECR manifest with explicit amd64 tag
120123 if : github.event.release.name != ''
121124 id : annotate-ecr-manifest-explicit-amd64
122125 run : |
123- docker manifest annotate "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ github.event.release.name }}" \
126+ docker manifest annotate "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ steps.version.outputs.VERSION }}" \
124127 "${{ needs.build-and-upload-image-to-ecr.outputs.full_image_x86_64 }}" \
125128 --arch amd64 \
126129 --os linux
127130 - name : Push ECR manifest with explicit version
128131 if : github.event.release.name != ''
129132 id : push-ecr-manifest-explicit
130133 run : |
131- docker manifest push "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:$$ {{ github.event.release.name }}"
134+ docker manifest push "${{ needs.build-and-upload-image-to-ecr.outputs.ecr_registry_repository }}:${{ steps.version.outputs.VERSION }}"
132135 - name : Create ECR manifest with latest tag
133136 id : create-ecr-manifest-latest
134137 run : |
0 commit comments