From 367b4063af4e79efc52555d15a226ed9315f1545 Mon Sep 17 00:00:00 2001 From: Kostas Stamatakis Date: Mon, 14 Oct 2024 20:16:44 +0300 Subject: [PATCH] fix gh artifacts upload --- .github/actions/docker-images/action.yml | 10 +++++----- .github/actions/k8s-ci/action.yml | 2 +- .github/workflows/ci.yml | 10 ++++++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/actions/docker-images/action.yml b/.github/actions/docker-images/action.yml index 97ff51513b..92b9f56eae 100644 --- a/.github/actions/docker-images/action.yml +++ b/.github/actions/docker-images/action.yml @@ -26,7 +26,7 @@ inputs: docker-images-folder: description: 'Docker build cache folder' required: false - default: '/tmp/.docker-images' + default: .docker-images goos: description: 'GOOS environment variable' @@ -118,16 +118,16 @@ runs: name: Rotate cache shell: bash run: | - ls -lahR /tmp/ || true + ls -lahR ${{ inputs.docker-images-folder }} || true [[ -d ${{ inputs.docker-build-cache-folder }}-new ]] && rm -rf ${{ inputs.docker-build-cache-folder }} && mv ${{ inputs.docker-build-cache-folder }}-new ${{ inputs.docker-build-cache-folder }} - if: ${{ inputs.build-docker-images == 'true' }} name: Upload docker images - # Pin action version to 4.3.4 See https://github.com/actions/upload-artifact/issues/589 - uses: actions/upload-artifact@v4.3.4 + uses: actions/upload-artifact@v4 with: name: docker-images - path: ${{ inputs.docker-images-folder }} + path: | + ${{ inputs.docker-images-folder }}/*.tar if-no-files-found: error retention-days: 2 overwrite: true diff --git a/.github/actions/k8s-ci/action.yml b/.github/actions/k8s-ci/action.yml index 271118efb5..537c5ca1ba 100644 --- a/.github/actions/k8s-ci/action.yml +++ b/.github/actions/k8s-ci/action.yml @@ -19,7 +19,7 @@ inputs: docker-images-folder: description: 'Docker build cache folder' required: false - default: '/tmp/.docker-images' + default: .docker-images runs: using: composite steps: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46cde6466a..c67ae75e78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,11 @@ on: # - main # - "[0-9]+.[0-9]+" # types: [opened, synchronize, reopened] + pull_request: + branches: + - main + - "[0-9]+.[0-9]+" + types: [opened, synchronize, reopened] push: branches: - main @@ -230,6 +235,7 @@ jobs: uses: ./.github/actions/docker-images with: build-docker-images: 'true' + docker-images-folder: .docker-images ci-k8s: needs: [ init-hermit, docker-images ] @@ -280,7 +286,7 @@ jobs: uses: ./.github/actions/docker-images with: build-docker-images: 'false' - docker-images-folder: '/tmp/.docker-images' + docker-images-folder: .docker-images - name: Run k8s integration tests uses: ./.github/actions/k8s-ci @@ -288,7 +294,7 @@ jobs: kind-config: ${{ matrix.kind-config }} test-target: ${{ matrix.test-target }} values-file: ${{ matrix.values-file }} - docker-images-folder: '/tmp/.docker-images' + docker-images-folder: .docker-images upload-allure-results: needs: