Skip to content

Commit

Permalink
CI: Use buildx imagetools create for multi-arch image copying
Browse files Browse the repository at this point in the history
  • Loading branch information
parisk committed May 11, 2024
1 parent 979e97a commit 20eb081
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
- variant: bookworm
is_default_variant: true
steps:
- uses: actions/checkout@v4.1.1
- uses: docker/login-action@v3
- uses: actions/checkout@v4.1.4
- uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -42,26 +42,17 @@ jobs:
- name: "Python + Variant: ${{ env.POETRY_VERSION }}-python-${{ matrix.python }}-${{ matrix.variant }}"
run: |
RELEASE_TAG="${BASE_RELEASE_TAG}-python-${{ matrix.python }}-${{ matrix.variant }}"
docker pull $GIT_SHA_TAG
docker tag $GIT_SHA_TAG $RELEASE_TAG
docker push $RELEASE_TAG
docker buildx imagetools create --tag $RELEASE_TAG $GIT_SHA_TAG
- name: "Python + Default Variant: ${{ env.POETRY_VERSION }}-python-${{ matrix.python }}"
if: matrix.is_default_variant
run: |
RELEASE_TAG="${BASE_RELEASE_TAG}-python-${{ matrix.python }}"
docker pull $GIT_SHA_TAG
docker tag $GIT_SHA_TAG $RELEASE_TAG
docker push $RELEASE_TAG
docker buildx imagetools create --tag $RELEASE_TAG $GIT_SHA_TAG
- name: "Default Python + Variant: ${{ env.POETRY_VERSION }}-${{ matrix.variant }}"
if: matrix.is_default_python
run: |
RELEASE_TAG="${BASE_RELEASE_TAG}-${{ matrix.variant }}"
docker pull $GIT_SHA_TAG
docker tag $GIT_SHA_TAG $RELEASE_TAG
docker push $RELEASE_TAG
docker buildx imagetools create --tag $RELEASE_TAG $GIT_SHA_TAG
- name: "Default Python + Default Variant: ${{ env.POETRY_VERSION }}"
if: matrix.is_default_python && matrix.is_default_variant
run: |
docker pull $GIT_SHA_TAG
docker tag $GIT_SHA_TAG $BASE_RELEASE_TAG
docker push $BASE_RELEASE_TAG
run: docker buildx imagetools create --tag $BASE_RELEASE_TAG $GIT_SHA_TAG

0 comments on commit 20eb081

Please sign in to comment.