From cf7f8d5e54f7ddd4d3391e59703ec194774cab7f Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Wed, 26 Jun 2024 17:27:42 -0400 Subject: [PATCH] adopt upload/download breaking changes in Py wheel build on release publish --- .github/workflows/build-wheels.yml | 14 ++++++++------ .github/workflows/ci-build.yml | 8 ++++---- .github/workflows/node-sdk.yml | 2 +- .github/workflows/publish-docker-images.yml | 15 ++++++++------- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index f17b2d81..567f7046 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -25,7 +25,7 @@ jobs: fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: '3.x' @@ -42,7 +42,7 @@ jobs: - uses: actions/upload-artifact@v4 if: startsWith(matrix.spec.name, 'linux') with: - name: zrok_sdk + name: zrok_sdk_${{ matrix.spec.target }} path: ${{ github.workspace }}/sdk/python/sdk/zrok/dist/* publish: @@ -52,15 +52,17 @@ jobs: id-token: write steps: - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - path: download + path: ./download + merge-multiple: true + pattern: zrok_sdk_* - name: check run: | - ls -lR download + ls -lR ./download/ mkdir dist - cp download/*/* dist + cp ./download/*/* ./dist/ - name: Publish wheels (TestPYPI) uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index df317336..9f1569a1 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -95,22 +95,22 @@ jobs: uses: actions/checkout@v4 - name: Download Branch Build Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: linux-amd64 path: ./dist/amd64/linux/ - name: Set Up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 with: platforms: amd64,arm64 - name: Set Up Docker BuildKit id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ vars.DOCKER_HUB_API_USER || secrets.DOCKER_HUB_API_USER }} password: ${{ secrets.DOCKER_HUB_API_TOKEN }} diff --git a/.github/workflows/node-sdk.yml b/.github/workflows/node-sdk.yml index 0599c8a0..ae1b9254 100644 --- a/.github/workflows/node-sdk.yml +++ b/.github/workflows/node-sdk.yml @@ -49,7 +49,7 @@ jobs: - name: Setup .npmrc if: github.ref_type == 'tag' # Setup .npmrc file to prepare for possible publish to npm - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.yml index 0f3f0f3e..fdabfc14 100644 --- a/.github/workflows/publish-docker-images.yml +++ b/.github/workflows/publish-docker-images.yml @@ -39,20 +39,20 @@ jobs: uses: dsaltares/fetch-gh-release-asset@1.1.2 with: version: tags/v${{ steps.semver.outputs.zrok_semver }} - file: zrok*_${{ steps.semver.outputs.zrok_semver }}_linux_amd64.tar.gz - target: dist/amd64/linux/zrok_${{ steps.semver.outputs.zrok_semver }}_linux_amd64.tar.gz + file: zrok*_linux_amd64.tar.gz + target: dist/amd64/linux/zrok_linux_amd64.tar.gz - name: Download Linux ARM64 Release Artifact uses: dsaltares/fetch-gh-release-asset@1.1.2 with: version: tags/v${{ steps.semver.outputs.zrok_semver }} - file: zrok*_${{ steps.semver.outputs.zrok_semver }}_linux_arm64.tar.gz - target: dist/arm64/linux/zrok_${{ steps.semver.outputs.zrok_semver }}_linux_arm64.tar.gz + file: zrok*_linux_arm64.tar.gz + target: dist/arm64/linux/zrok_linux_arm64.tar.gz - name: Unpack the Release Artifacts run: | for TGZ in dist/{amd,arm}64/linux; do - tar -xvzf ${TGZ}/zrok_*.tar.gz -C ${TGZ} + tar -xvzf ${TGZ}/*.tar.gz -C ${TGZ} done - name: Set Up QEMU @@ -76,8 +76,9 @@ jobs: ZROK_CONTAINER_IMAGE_TAG: ${{ steps.semver.outputs.zrok_semver }} id: tagprep_cli run: | - echo DOCKER_TAGS="${ZROK_CONTAINER_IMAGE_REPO}:${ZROK_CONTAINER_IMAGE_TAG},${ZROK_CONTAINER_IMAGE_REPO}:latest" \ - | tee -a $GITHUB_OUTPUT + DOCKER_TAGS="${ZROK_CONTAINER_IMAGE_REPO}:${ZROK_CONTAINER_IMAGE_TAG}" + DOCKER_TAGS+=",${ZROK_CONTAINER_IMAGE_REPO}:latest" + echo "DOCKER_TAGS=${DOCKER_TAGS}" | tee -a $GITHUB_OUTPUT # this is the CLI image with the Linux binary for each # arch that was downloaded in ./dist/