| command | Command to execute (build, run, test, bench) | no | build |
| source-dir | The directory containing the Go project to build | no | ${{ github.workspace }} |
| result-dir | The directory to store build results | no | — |
| build-config | The path to the build configuration file | no | — |
| buildmode | Build mode (default, archive, shared, c-archive, c-shared) | no | — |
| bin-name | Name of the output binary | no | — |
| bin-name-no-suffix | Do not append architecture suffix to binary name | no | — |
| add-go-build-args | Additional Go command arguments | no | — |
| targets | Target targets to build for (e.g. linux/amd64,windows/386) | no | — |
| cgo-enabled | Enable CGO | no | 0 |
| force-cgo | Force use of CGO | no | — |
| cc | Force set the specific C compiler | no | — |
| cxx | Force set the specific C++ compiler | no | — |
| use-default-cc-cxx | Use the default C and C++ compilers | no | — |
| cgo-flags | CGO compiler flags | no | — |
| cgo-ldflags | CGO linker flags | no | — |
| ldflags | Go linker flags | no | — |
| ext-ldflags | External linker flags | no | — |
| tags | Build tags | no | — |
| github-proxy-mirror | GitHub proxy mirror URL for downloading cross compilers | no | — |
| cross-compiler-dir | Directory to store cross compilers | no | — |
| ndk-version | Android NDK version for Android builds | no | — |
| go-clean-cache | Clean Go build cache before building | no | — |
| enable-micro | Enable building micro architecture variants | no | — |
| show-all-targets | Show all supported targets | no | false |
| race | enable data race detection. Supported only on linux/amd64, freebsd/amd64, darwin/amd64, darwin/arm64, windows/amd64, linux/ppc64le and linux/arm64 (only for 48-bit VMA). | no | — |
| a | force rebuilding of packages that are already up-to-date. | no | — |
| n | print the commands but do not run them. | no | — |
| x | print the commands. | no | — |
| v | print the names of packages as they are compiled. | no | — |
| work | print the name of the temporary work directory and do not delete it when exiting. | no | — |
| p | the number of programs that can be run in parallel. | no | — |
| msan | enable interoperation with memory sanitizer. | no | — |
| asan | enable interoperation with address sanitizer. | no | — |
| cover | enable code coverage instrumentation. | no | — |
| covermode | set the mode for coverage analysis (set, count, atomic). | no | — |
| coverpkg | apply coverage analysis to packages matching pattern. | no | — |
| asmflags | arguments to pass on each go tool asm invocation. | no | — |
| buildvcs | whether to stamp binaries with version control information. | no | — |
| compiler | name of compiler to use (gccgo or gc). | no | — |
| gccgoflags | arguments to pass on each gccgo compiler/linker invocation. | no | — |
| gcflags | arguments to pass on each go tool compile invocation. | no | — |
| installsuffix | a suffix to use in the name of the package installation directory. | no | — |
| json | emit build output in JSON format. | no | — |
| linkshared | build code that will be linked against shared libraries. | no | — |
| mod | module download mode (readonly, vendor, or mod). | no | — |
| modcacherw | leave newly-created directories in the module cache read-write. | no | — |
| modfile | read an alternate go.mod file. | no | — |
| overlay | read a JSON config file that provides an overlay for build operations. | no | — |
| pgo | specify the file path of a profile for profile-guided optimization. | no | — |
| pkgdir | install and load all packages from dir. | no | — |
| trimpath | remove all file system paths from the resulting executable. | no | — |
| toolexec | a program to use to invoke toolchain programs. | no | — |
| change-dir | change to dir before running the command. | no | — |
| use-gnu-libc | use GNU libc instead of musl for Linux targets. | no | — |
| apple-simulator | build for Apple simulator (iOS/tvOS/watchOS). | no | — |
| api | Android API level for Android builds (default: 24). | no | — |
| cgo-deps-version | CGO dependencies version. | no | — |
| package | package path to build (default: current directory). | no | — |
| config-args | Additional build configuration arguments | no | — |