Skip to content

Commit 5daac75

Browse files
authored
Update release_build.yml to reorder image releases (#147)
*Issue #, if available:* *Description of changes:* Reordering the release steps in release_build.yml. - The old order is Public and Private ECR -> PyPI -> GitHub - The new order is PyPI -> Public ECR -> GitHub -> Private ECR. ### Testing Tested by creating a fork of this repo and running the release workflow. Changed the repos to my own private/public ECR repos and the images were published successfully as well as a draft release was created. One thing to callout, I removed the PyPI step as this step wasn't changed and I didn't see a reason to test publishing there. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent 146af7e commit 5daac75

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

.github/workflows/release_build.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,26 +90,37 @@ jobs:
9090
run: |
9191
twine upload --repository testpypi --skip-existing --verbose dist/aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl
9292
93-
# The following step publish to ECR
94-
- name: Build and push images
93+
# Publish to prod PyPI
94+
- name: Publish to PyPI
95+
env:
96+
TWINE_USERNAME: '__token__'
97+
TWINE_PASSWORD: ${{ env.PROD_PYPI_TOKEN_API_TOKEN }}
98+
run: |
99+
twine upload --skip-existing --verbose dist/aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl
100+
101+
# Publish to public ECR
102+
- name: Build and push public ECR image
95103
uses: docker/build-push-action@v5
96104
with:
97105
push: true
98106
context: .
99107
file: ./Dockerfile
100108
platforms: linux/amd64,linux/arm64
101109
tags: |
102-
${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}
103110
${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}
104111
105-
# Publish to prod PyPI
106-
- name: Publish to PyPI
107-
env:
108-
TWINE_USERNAME: '__token__'
109-
TWINE_PASSWORD: ${{ env.PROD_PYPI_TOKEN_API_TOKEN }}
110-
run: |
111-
twine upload --skip-existing --verbose dist/aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl
112+
# Publish to private ECR
113+
- name: Build and push private ECR image
114+
uses: docker/build-push-action@v5
115+
with:
116+
push: true
117+
context: .
118+
file: ./Dockerfile
119+
platforms: linux/amd64,linux/arm64
120+
tags: |
121+
${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}
112122
123+
# Publish to GitHub releases
113124
- name: Create GH release
114125
id: create_release
115126
env:

0 commit comments

Comments
 (0)