Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .github/actions/build-binaries/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,24 @@ runs:
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Run GoReleaser (build)
if: inputs.release != 'true'
- name: Run GoReleaser (build - all architectures)
if: inputs.release != 'true' && inputs.single-arch == ''
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: v2.13.1
args: build --snapshot ${{ inputs.single-arch != '' && '--single-target' || '' }}
args: build --snapshot
env:
GITHUB_TOKEN: ${{ github.token }}
GOOS: ${{ inputs.single-arch != '' && 'linux' || '' }}

- name: Run GoReleaser (build - single architecture)
if: inputs.release != 'true' && inputs.single-arch != ''
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: v2.13.1
args: build --snapshot --single-target
env:
GITHUB_TOKEN: ${{ github.token }}
GOOS: linux
GOARCH: ${{ inputs.single-arch }}
19 changes: 19 additions & 0 deletions .github/actions/build-docker-images/scripts/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ func organizeBinaries() error {
}
fmt.Printf("Copied %s -> %s\n", distPath, buildPath)
} else {
printDirectoryContents("dist")
return fmt.Errorf("binary not found: %s for architecture %s (expected at %s)", binary, arch, distPath)
}
}
Expand Down Expand Up @@ -559,3 +560,21 @@ func downloadFile(url, fpath string) error {
_, err = io.Copy(out, resp.Body)
return err
}

func printDirectoryContents(dir string) {
fmt.Fprintf(os.Stderr, "\nContents of %s directory:\n", dir)
err := filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {
if err != nil {
return nil // skip errors
}
if info.IsDir() {
fmt.Fprintf(os.Stderr, " %s/\n", path)
} else {
fmt.Fprintf(os.Stderr, " %s\n", path)
}
return nil
})
if err != nil {
fmt.Fprintf(os.Stderr, " (failed to list %s directory: %v)\n", dir, err)
}
}
Loading