From 122220199bf1185c2c607c2c9774e4f39427e866 Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Thu, 2 May 2024 10:33:01 +0200 Subject: [PATCH] ci: modernize artifact action (#737) supersedes #625 supersedes #624 --------- Signed-off-by: dependabot[bot] Signed-off-by: Jan Kowalleck Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker.yml | 4 ++-- .github/workflows/python.yml | 14 ++++++++------ .github/workflows/release.yml | 6 +++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 16139595..263d85fa 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -58,7 +58,7 @@ jobs: !failure() && !cancelled() && steps.after-release.outputs.released # see https://github.com/actions/upload-artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.RUN_ARTIFACT_PYTHON_DIST }} path: ${{ env.DIST_SOURCE_DIR }}/ @@ -90,7 +90,7 @@ jobs: - name: Artifact reports if: ${{ ! cancelled() }} # see https://github.com/actions/upload-artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.REPORTS_ARTIFACT }} path: ${{ env.REPORTS_DIR }} diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index cc0277b6..485c4c05 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -28,7 +28,7 @@ on: branches: [ 'main' ] concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: '${{ github.workflow }}-${{ github.ref }}' cancel-in-progress: true env: @@ -200,9 +200,9 @@ jobs: - name: Artifact reports if: ${{ ! cancelled() }} # see https://github.com/actions/upload-artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.TESTS_REPORTS_ARTIFACT }} + name: '${{ env.TESTS_REPORTS_ARTIFACT }}_bnt_${{ matrix.os }}_py${{ matrix.python-version }}' path: ${{ env.REPORTS_DIR }} if-no-files-found: error @@ -214,14 +214,16 @@ jobs: steps: - name: fetch test artifacts # see https://github.com/actions/download-artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: ${{ env.TESTS_REPORTS_ARTIFACT }} + pattern: '${{ env.TESTS_REPORTS_ARTIFACT }}_bnt_*' + merge-multiple: true path: ${{ env.REPORTS_DIR }} - name: Run codacy-coverage-reporter env: CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} - if: ${{ env.CODACY_PROJECT_TOKEN != '' }} ## see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-secrets + ## see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-secrets + if: ${{ env.CODACY_PROJECT_TOKEN != '' }} # see https://github.com/codacy/codacy-coverage-reporter-action uses: codacy/codacy-coverage-reporter-action@v1 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1baff7f5..261a4150 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -141,7 +141,7 @@ jobs: !failure() && !cancelled() && steps.release.outputs.released == 'true' # see https://github.com/actions/upload-artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.DIST_ARTIFACT }} path: ${{ env.DIST_DIR }}/ @@ -184,7 +184,7 @@ jobs: mkdir "$DIST_DIR" - name: Fetch python dist artifact # see https://github.com/actions/download-artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.DIST_ARTIFACT }} path: ${{ env.DIST_DIR }}/ @@ -217,7 +217,7 @@ jobs: - name: Artifact reports if: ${{ ! cancelled() }} # see https://github.com/actions/upload-artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.ARTIFACT_DOCKER_SBOM }} path: ${{ env.REPORTS_DIR }}/*.bom.*