Skip to content

Commit

Permalink
Fix version
Browse files Browse the repository at this point in the history
  • Loading branch information
ybizeul committed Aug 22, 2023
1 parent 175d976 commit 980b4cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/push-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

# Set version environment
- name: Set VERSION
run: echo "VERSION=`echo $GITHUB_REF|IFS=\"/\" read foo foo version; echo $version`" >> $GITHUB_ENV
run: echo "YBFEED_VERSION=`echo $GITHUB_REF|cut -d / -f 3`" >> $GITHUB_ENV

# Build web ui
- name: Use Node.js 20.x
Expand All @@ -30,6 +30,6 @@ jobs:

# Build docker image
- uses: ko-build/[email protected]
- run: GOFLAGS="-ldflags=-X=main.version=$VERSION" ko build -B --platform all --sbom none ./cmd/ybfeed
- run: GOFLAGS="-ldflags=-X=main.version=$YBFEED_VERSION" ko build -B --platform all --sbom none ./cmd/ybfeed
env:
KO_DOCKER_REPO: ghcr.io/ybizeul
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

# Set version environment
- name: Set VERSION
run: echo "VERSION=`echo $GITHUB_REF|IFS=\"/\" read foo foo version; echo $version`" >> $GITHUB_ENV
run: echo "YBFEED_VERSION=`echo $GITHUB_REF|cut -d / -f 3`" >> $GITHUB_ENV

# Build web ui
- name: Use Node.js 20.x
Expand Down Expand Up @@ -48,6 +48,6 @@ jobs:

# Build docker image
- uses: ko-build/[email protected]
- run: GOFLAGS="-ldflags=-X=main.version=$VERSION" ko build -B --platform all --sbom none --tags "$VERSION,latest" ./cmd/ybfeed
- run: GOFLAGS="-ldflags=-X=main.version=$YBFEED_VERSION" ko build -B --platform all --sbom none --tags "$YBFEED_VERSION,latest" ./cmd/ybfeed
env:
KO_DOCKER_REPO: ghcr.io/ybizeul

0 comments on commit 980b4cc

Please sign in to comment.