From ec95e58e13aaf2a4da6db7e6979038a858ed5fc7 Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Sun, 16 Oct 2022 12:12:28 +1300 Subject: [PATCH] Use ${{ github.ref_name }} for workflow build tags --- .github/workflows/build-docker.yml | 8 ++------ .github/workflows/release-build.yml | 7 +------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 16bb26f..097dc1c 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -10,10 +10,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Get tag - id: tag - uses: dawidd6/action-get-tag@v1 - - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -32,6 +28,6 @@ jobs: context: . platforms: linux/386,linux/amd64,linux/arm,linux/arm64 build-args: | - "VERSION=${{ steps.tag.outputs.tag }}" + "VERSION=${{ github.ref_name }}" push: true - tags: axllent/mailpit:latest,axllent/mailpit:${{ steps.tag.outputs.tag }} + tags: axllent/mailpit:latest,axllent/mailpit:${{ github.ref_name }} diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 8541a63..38598fc 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -23,11 +23,6 @@ jobs: steps: - uses: actions/checkout@v3 - # @TODO: replace deprecated action with ${{ github.ref_name }} - - name: Get tag - id: tag - uses: dawidd6/action-get-tag@v1 - # build the assets - uses: actions/setup-node@v3 with: @@ -49,4 +44,4 @@ jobs: extra_files: LICENSE README.md md5sum: false overwrite: true - ldflags: -w -X "github.com/axllent/mailpit/config.Version=${{ steps.tag.outputs.tag }}" + ldflags: -w -X "github.com/axllent/mailpit/config.Version=${{ github.ref_name }}"