From a2b2e8dbdf928b18499db7cc1020101ded0de1fd Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 19 Jan 2024 08:54:45 +0000 Subject: [PATCH] Use Github Artifacts v4 (#4011) --- .github/workflows/docs-pr-netlify.yaml | 7 ++----- .github/workflows/sonarcloud.yml | 16 +++++++++++----- .github/workflows/static_analysis.yml | 2 +- .github/workflows/tests.yml | 4 ++-- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docs-pr-netlify.yaml b/.github/workflows/docs-pr-netlify.yaml index 700014c12..2198005b9 100644 --- a/.github/workflows/docs-pr-netlify.yaml +++ b/.github/workflows/docs-pr-netlify.yaml @@ -11,13 +11,10 @@ jobs: if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' runs-on: ubuntu-latest steps: - # There's a 'download artifact' action, but it hasn't been updated for the workflow_run action - # (https://github.com/actions/download-artifact/issues/60) so instead we get this mess: - name: 📥 Download artifact - uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d # v3 + uses: actions/download-artifact@v4 with: - workflow: static_analysis.yml - run_id: ${{ github.event.workflow_run.id }} + run-id: ${{ github.event.workflow_run.id }} name: docs path: docs diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index d533c714d..485e0595a 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -28,15 +28,21 @@ jobs: -Dsonar.javascript.lcov.reportPaths=${{ steps.extra_args.outputs.reportPaths }} -Dsonar.testExecutionReportPaths=${{ steps.extra_args.outputs.testExecutionReportPaths }} steps: - # There's a 'download artifact' action, but it hasn't been updated for the workflow_run action - # (https://github.com/actions/download-artifact/issues/60) so instead we get this mess: - name: 📥 Download artifact - uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d # v3 + uses: actions/download-artifact@v4 + if: ${{ !inputs.sharded }} with: - workflow: tests.yaml - run_id: ${{ github.event.workflow_run.id }} + run-id: ${{ github.event.workflow_run.id }} name: coverage path: coverage + - name: 📥 Download sharded artifacts + uses: actions/download-artifact@v4 + if: inputs.sharded + with: + run-id: ${{ github.event.workflow_run.id }} + pattern: coverage-* + path: coverage + merge-multiple: true - id: extra_args run: | diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index 579be86ad..4e1070d1c 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -91,7 +91,7 @@ jobs: find _docs -mindepth 1 -maxdepth 1 -type d -execdir mv {} stable \; -quit - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: docs path: _docs diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0e62847ea..3c2241e1c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,9 +56,9 @@ jobs: - name: Upload Artifact if: env.ENABLE_COVERAGE == 'true' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: coverage + name: coverage-${{ matrix.specs }}-${{ matrix.node == 'lts/*' && 'lts' || matrix.node }} path: | coverage !coverage/lcov-report