Skip to content

Commit b768b00

Browse files
committed
fix gh artifacts upload
1 parent 4015c3d commit b768b00

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

.github/actions/docker-images/action.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ inputs:
2626
docker-images-folder:
2727
description: 'Docker build cache folder'
2828
required: false
29-
default: '/tmp/.docker-images'
29+
default: /tmp/.docker-images
3030

3131
goos:
3232
description: 'GOOS environment variable'
@@ -118,16 +118,16 @@ runs:
118118
name: Rotate cache
119119
shell: bash
120120
run: |
121-
ls -lahR /tmp/ || true
121+
ls -lahR ${{ inputs.docker-images-folder }} || true
122122
[[ -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 }}
123123
124124
- if: ${{ inputs.build-docker-images == 'true' }}
125125
name: Upload docker images
126-
# Pin action version to 4.3.4 See https://github.com/actions/upload-artifact/issues/589
127-
uses: actions/[email protected]
126+
uses: actions/upload-artifact@v4
128127
with:
129128
name: docker-images
130-
path: ${{ inputs.docker-images-folder }}
129+
path: |
130+
${{ inputs.docker-images-folder }}/*.tar
131131
if-no-files-found: error
132132
retention-days: 2
133133
overwrite: true

.github/actions/k8s-ci/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ inputs:
1919
docker-images-folder:
2020
description: 'Docker build cache folder'
2121
required: false
22-
default: '/tmp/.docker-images'
22+
default: /tmp/.docker-images
2323
runs:
2424
using: composite
2525
steps:

.github/workflows/ci.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
# - main
88
# - "[0-9]+.[0-9]+"
99
# types: [opened, synchronize, reopened]
10+
pull_request:
11+
branches:
12+
- main
13+
- "[0-9]+.[0-9]+"
14+
types: [opened, synchronize, reopened]
1015
push:
1116
branches:
1217
- main
@@ -230,6 +235,7 @@ jobs:
230235
uses: ./.github/actions/docker-images
231236
with:
232237
build-docker-images: 'true'
238+
docker-images-folder: /tmp/.docker-images
233239

234240
ci-k8s:
235241
needs: [ init-hermit, docker-images ]
@@ -280,15 +286,15 @@ jobs:
280286
uses: ./.github/actions/docker-images
281287
with:
282288
build-docker-images: 'false'
283-
docker-images-folder: '/tmp/.docker-images'
289+
docker-images-folder: /tmp/.docker-images
284290

285291
- name: Run k8s integration tests
286292
uses: ./.github/actions/k8s-ci
287293
with:
288294
kind-config: ${{ matrix.kind-config }}
289295
test-target: ${{ matrix.test-target }}
290296
values-file: ${{ matrix.values-file }}
291-
docker-images-folder: '/tmp/.docker-images'
297+
docker-images-folder: /tmp/.docker-images
292298

293299
upload-allure-results:
294300
needs:

0 commit comments

Comments
 (0)