Skip to content

Commit

Permalink
Set nightly version correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryNguyen5 committed Sep 28, 2024
1 parent 690cd0b commit 2d27751
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build-publish-develop-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ on:

env:
GIT_REF: ${{ github.event.inputs.git_ref || github.ref }}
#TODO: Set nightly version correctly
#

jobs:
merge:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -149,7 +148,7 @@ jobs:
fi
elif [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
echo "image-tag=${short_sha}" | tee -a $GITHUB_OUTPUT
if [[ "${{ github.event.inputs.build-publish }}" == 'false' ]]; then
if [[ "${{ inputs.build-publish }}" == 'false' ]]; then
echo "release-type=snapshot" | tee -a $GITHUB_OUTPUT
else
echo "release-type=nightly" | tee -a $GITHUB_OUTPUT
Expand Down
2 changes: 2 additions & 0 deletions .goreleaser.develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,5 @@ before:
- cmd: ./tools/bin/goreleaser_utils before_hook
partial:
by: target
nightly:
version_template: '{{ .Env.VERSION }}-{{ .Env.IMAGE_TAG }}'
3 changes: 3 additions & 0 deletions tools/goreleaser-config/gen_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func Generate(environment string) config.Project {
Snapshot: config.Snapshot{
VersionTemplate: "{{ .Env.VERSION }}-{{ .ShortCommit }}",
},
Nightly: config.Nightly{
VersionTemplate: "{{ .Env.VERSION }}-{{ .Env.IMAGE_TAG }}",
},
Partial: config.Partial{
By: "target",
},
Expand Down

0 comments on commit 2d27751

Please sign in to comment.