From c9aeca19ce07fa7a5f2aba75ac77002abfe65f3b Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Fri, 26 Jan 2024 09:21:02 +0100 Subject: [PATCH 1/2] bump actions/upload-artifact and actions/download-artifact to 4 Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- .github/workflows/build.yml | 27 +++++++++++++++++---------- .github/workflows/docs-upstream.yml | 2 +- .github/workflows/e2e.yml | 4 ++-- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae1218d1812..2e05ec244d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,6 +74,10 @@ jobs: pkg: - ./tests steps: + - + name: Prepare + run: | + echo "TESTREPORTS_NAME=${{ github.job }}-$(echo "${{ matrix.pkg }}-${{ matrix.worker }}" | tr -dc '[:alnum:]-\n\r' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV - name: Checkout uses: actions/checkout@v4 @@ -100,9 +104,9 @@ jobs: - name: Test run: | - export TEST_REPORT_SUFFIX=-${{ github.job }}-$(echo "${{ matrix.pkg }}-${{ matrix.worker }}" | tr -dc '[:alnum:]-\n\r' | tr '[:upper:]' '[:lower:]') ./hack/test env: + TEST_REPORT_SUFFIX: "-${{ env.TESTREPORTS_NAME }}" TEST_DOCKERD: "${{ startsWith(matrix.worker, 'docker') && '1' || '0' }}" TESTFLAGS: "${{ (matrix.worker == 'docker' || matrix.worker == 'docker\\+containerd') && env.TESTFLAGS_DOCKER || env.TESTFLAGS }} --run=//worker=${{ matrix.worker }}$" TESTPKGS: "${{ matrix.pkg }}" @@ -122,9 +126,9 @@ jobs: - name: Upload test reports if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: test-reports + name: test-reports-${{ env.TESTREPORTS_NAME }} path: ./bin/testreports test-unit: @@ -150,8 +154,10 @@ jobs: - name: Prepare run: | + testreportsName=${{ github.job }}--${{ matrix.os }} testreportsBaseDir=./bin/testreports - testreportsDir=$testreportsBaseDir/unit-${{ matrix.os }} + testreportsDir=$testreportsBaseDir/$testreportsName + echo "TESTREPORTS_NAME=$testreportsName" >> $GITHUB_ENV echo "TESTREPORTS_BASEDIR=$testreportsBaseDir" >> $GITHUB_ENV echo "TESTREPORTS_DIR=$testreportsDir" >> $GITHUB_ENV mkdir -p $testreportsDir @@ -191,9 +197,9 @@ jobs: - name: Upload test reports if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: test-reports + name: test-reports-${{ env.TESTREPORTS_NAME }} path: ${{ env.TESTREPORTS_BASEDIR }} prepare-binaries: @@ -251,9 +257,9 @@ jobs: CACHE_TO: type=gha,scope=binaries-${{ env.PLATFORM_PAIR }},mode=max - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: buildx + name: buildx-${{ env.PLATFORM_PAIR }} path: ${{ env.DESTDIR }}/* if-no-files-found: error @@ -322,10 +328,11 @@ jobs: uses: actions/checkout@v4 - name: Download binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: buildx path: ${{ env.DESTDIR }} + pattern: buildx-* + merge-multiple: true - name: Create checksums run: ./hack/hash-files diff --git a/.github/workflows/docs-upstream.yml b/.github/workflows/docs-upstream.yml index 9b007f6a483..2439a245973 100644 --- a/.github/workflows/docs-upstream.yml +++ b/.github/workflows/docs-upstream.yml @@ -45,7 +45,7 @@ jobs: DOCS_FORMATS: yaml - name: Upload reference YAML docs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: docs-yaml path: /tmp/buildx-docs/out/reference diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index f0bfc0e845e..279dfe0cd40 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -46,7 +46,7 @@ jobs: mv ${{ env.DESTDIR }}/build/buildx ${{ env.DESTDIR }}/build/docker-buildx - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: binary path: ${{ env.DESTDIR }}/build @@ -103,7 +103,7 @@ jobs: if: matrix.driver == 'docker' || matrix.driver == 'docker-container' - name: Install buildx - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: binary path: /home/runner/.docker/cli-plugins From 1861405b1e0f4591240fb37e52de240c1585c29c Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Fri, 26 Jan 2024 09:37:40 +0100 Subject: [PATCH 2/2] ci(docs-upstream): pin reusable workflow Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- .github/workflows/docs-upstream.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-upstream.yml b/.github/workflows/docs-upstream.yml index 2439a245973..5f80f248209 100644 --- a/.github/workflows/docs-upstream.yml +++ b/.github/workflows/docs-upstream.yml @@ -52,7 +52,7 @@ jobs: retention-days: 1 validate: - uses: docker/docs/.github/workflows/validate-upstream.yml@main + uses: docker/docs/.github/workflows/validate-upstream.yml@919a9b9104a34a40b30d116529bcce589a544d1c # pin for artifact v4 support: https://github.com/docker/docs/pull/19220 needs: - docs-yaml with: