Skip to content

Commit 0d0266f

Browse files
committed
Use bash replace in container yaml
1 parent 2b516cc commit 0d0266f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/container_images.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ jobs:
7979
outputs: type=image,name=${{ env.REGISTRY }}/${{ matrix.variance.image }},push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }}
8080
cache-from: type=gha
8181
cache-to: type=gha,mode=max
82+
- name: Set artifact name
83+
if: github.event_name != 'pull_request'
84+
run: |
85+
ARTIFACT_NAME="${{ matrix.variance.image }}"
86+
ARTIFACT_NAME="${ARTIFACT_NAME//\//-}"
87+
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_ENV
8288
- name: Export digest
8389
if: github.event_name != 'pull_request'
8490
run: |
@@ -89,7 +95,7 @@ jobs:
8995
if: github.event_name != 'pull_request'
9096
uses: actions/upload-artifact@v4
9197
with:
92-
name: digests-${{ replace(matrix.variance.image, '/', '-') }}-${{ matrix.platform.arch }}
98+
name: digests-${{ env.ARTIFACT_NAME }}-${{ matrix.platform.arch }}
9399
path: /tmp/digests/*
94100
if-no-files-found: error
95101
retention-days: 1
@@ -117,11 +123,16 @@ jobs:
117123
- name: RockyLinux-9/CUDA-12.8.1
118124
image: "rust-gpu/rust-cuda-rockylinux9-cuda12"
119125
steps:
126+
- name: Set artifact name
127+
run: |
128+
ARTIFACT_NAME="${{ matrix.variance.image }}"
129+
ARTIFACT_NAME="${ARTIFACT_NAME//\//-}"
130+
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_ENV
120131
- name: Download digests
121132
uses: actions/download-artifact@v4
122133
with:
123134
path: /tmp/digests
124-
pattern: digests-${{ replace(matrix.variance.image, '/', '-') }}-*
135+
pattern: digests-${{ env.ARTIFACT_NAME }}-*
125136
merge-multiple: true
126137
- name: Set up Docker Buildx
127138
uses: docker/setup-buildx-action@v3

0 commit comments

Comments
 (0)