Skip to content

Commit

Permalink
Only use tag
Browse files Browse the repository at this point in the history
  • Loading branch information
hooksie1 committed Nov 11, 2022
1 parent f2f7f64 commit 2a1ccdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ jobs:
contents: write
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- name: Get tag and hash
run: echo "::set-output name=tag_hash::$(printf $(git describe --tags | cut -d '-' -f 1)-$(git rev-parse --short HEAD))"
- name: Checkout
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -88,5 +85,5 @@ jobs:
platforms: linux/amd64,linux/arm64
tags: |
hooksie1/cmsnr:latest
hooksie1/cmsnr:{{ steps.vars.outputs.tag_hash}}
hooksie1/cmsnr:${{ github.ref_name }}
4 changes: 2 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ before:
- go mod tidy

env:
- IMAGE_TAG={{.Tag}}-${{.ShortCommit}}
- IMAGE_TAG={{.Tag}}

project_name: cmsnrctl

builds:
- ldflags: "-extldflags= -w -X 'github.com/hooksie1/cmsnr/cmd.Version={{.Tag}}-{{.ShortCommit}}'"
- ldflags: "-extldflags= -w -X 'github.com/hooksie1/cmsnr/cmd.Version={{.Tag}}'"
env:
- "CGO_ENABLED=0"
- "GO111MODULE=on"
Expand Down

0 comments on commit 2a1ccdc

Please sign in to comment.