Skip to content

Commit

Permalink
refactor: Use runtime.GOARCH instead of hard-coding amd64 for the…
Browse files Browse the repository at this point in the history
… builder
  • Loading branch information
pojntfx committed May 30, 2024
1 parent 0947793 commit df68fda
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/hydrun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
uses: docker/setup-buildx-action@v1
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22.2"
- name: Build with hydrun
run: go run main.go -o golang ./Hydrunfile
- name: Publish branch preview release to GitHub releases
Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"log"
"os"
"os/exec"
"runtime"
"strings"

"github.com/spf13/pflag"
Expand Down Expand Up @@ -33,7 +34,7 @@ Usage: %s [OPTION...] "<COMMAND...>"
}

// Parse flags
archFlag := pflag.StringP("arch", "a", "amd64", "Comma-separated list of architectures to run on")
archFlag := pflag.StringP("arch", "a", runtime.GOARCH, "Comma-separated list of architectures to run on")
osFlag := pflag.StringP("os", "o", "debian", "Comma-separated list of operating systems (Docker images) to run on")
jobFlag := pflag.Int64P("jobs", "j", 1, "Maximum amount of parallel jobs")
itFlag := pflag.BoolP("it", "i", false, "Attach stdin and setup a TTY")
Expand Down

0 comments on commit df68fda

Please sign in to comment.