From e1173dd18617c5c7b0e85322e8bfb5ce0adac48b Mon Sep 17 00:00:00 2001 From: Jonathan LEI Date: Sun, 1 Sep 2024 02:51:38 +0800 Subject: [PATCH] ci: parameterize docker image tags --- .github/workflows/release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aa27a440..ae641970 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,6 +81,12 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Set up Docker tags + id: tag_param + run: | + REPO="${{ github.repository }}" + echo "repo=${REPO@L}" >> "$GITHUB_OUTPUT" + - name: Build and push Docker image uses: docker/build-push-action@v5 with: @@ -91,5 +97,5 @@ jobs: VERSION=${{ github.event.inputs.version_tag }} COMMIT_SHA=${{ github.sha }} tags: | - ghcr.io/erpc/erpc:latest - ghcr.io/erpc/erpc:${{ github.event.inputs.version_tag }} + ghcr.io/${{ steps.tag_param.outputs.repo }}:latest + ghcr.io/${{ steps.tag_param.outputs.repo }}:${{ github.event.inputs.version_tag }}