From bcbbfc5f527724ac9aabe4d3b09d44f441a1d4d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=B5=E6=9B=A6?= Date: Wed, 30 Oct 2024 10:05:32 +0800 Subject: [PATCH] Update ci.yml --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ddc737..50bc05b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,11 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Set tags name + env: + TAGNAME: ${{ env.TEST_TAG }}-${{ matrix.platform }} + run: echo "TAGNAME=${TAGNAME/\//-}" >> $GITHUB_ENV + - name: Build Docker image uses: docker/build-push-action@v6 with: @@ -35,12 +40,12 @@ jobs: context: . push: false load: true - tags: ${{ env.TEST_TAG }}-${{ matrix.platform }} + tags: ${{ env.TAGNAME }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new - name: Test Docker image - run: docker run --rm ${{ env.TEST_TAG }}-${{ matrix.platform }} -h + run: docker run --rm ${{ env.TAGNAME }} -h publish: runs-on: ubuntu-latest