Skip to content

Commit

Permalink
fix: making sure to only set BUILD_TAG for a delete:tag as opposed to…
Browse files Browse the repository at this point in the history
… all delete events
  • Loading branch information
Claire.Nicholas authored and Claire.Nicholas committed Jan 19, 2024
1 parent f59e17d commit 51b935c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions library/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,12 @@ func (b *Build) Environment(workspace, channel string) map[string]string {

// check if the Build event is delete:tag
if strings.EqualFold(b.GetEvent(), constants.EventDelete) && strings.EqualFold(b.GetEventAction(), constants.ActionTag) {
// capture the tag reference
tag := b.GetBranch()

// add the tag reference to the list
envs["BUILD_TAG"] = b.GetBranch()
envs["VELA_BUILD_TAG"] = b.GetBranch()
envs["BUILD_TAG"] = tag
envs["VELA_BUILD_TAG"] = tag
}

return envs
Expand Down

0 comments on commit 51b935c

Please sign in to comment.