Skip to content

Commit

Permalink
Fix GoReleaser GitHub action
Browse files Browse the repository at this point in the history
Signed-off-by: Francis Guimond <[email protected]>
  • Loading branch information
fguimond committed Feb 12, 2025
1 parent 62e7cef commit 6ee70d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
with:
go-version: 1.20.x
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,14 @@ func getDetails(event *corev2.Event) (details interface{}, err error) {
details = detailsStr
if config.detailsFormat == jsonDetailsFormat.String() {
var msgMap interface{}
fmt.Println("preeval", config.detailsTemplate)
fmt.Println("details", detailsStr)
err = json.Unmarshal([]byte(detailsStr), &msgMap)
if err != nil {
return "", fmt.Errorf("failed to unmarshal json details: %v", err)
return "", fmt.Errorf("--details-template needs to be a valid json document: %v", err)
}
details = msgMap
fmt.Println("resolved", details)
}
} else {
details = event
Expand Down

0 comments on commit 6ee70d5

Please sign in to comment.