From fb87592979b70ab4ec928bd65c4775b70250b903 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Fri, 19 Jul 2024 14:25:02 -0400 Subject: [PATCH 01/19] Adding issue and PR templates and my initial check in for dependabot. Signed-off-by: Robert Sirchia --- .github/dependabot.yml | 15 +++++++++++++++ .github/issue_template.md | 9 +++++++++ .github/pull_request_template.md | 12 ++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/issue_template.md create mode 100644 .github/pull_request_template.md diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..10ff906 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +version: 2 + +updates: + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "daily" + groups: + k8s.io: + patterns: + - "k8s.io/client-go" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/issue_template.md b/.github/issue_template.md new file mode 100644 index 0000000..cb83506 --- /dev/null +++ b/.github/issue_template.md @@ -0,0 +1,9 @@ + + +Output of `helm version`: + +Output of `helm-mapkubeapis`: + +Output of `kubectl version`: + +Cloud Provider/Platform (AKS, GKE, EKS, etc.): diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..cda9086 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,12 @@ + + +**What this PR does / why we need it**: + +**Special notes for your reviewer**: + +**If applicable**: +- [ ] this PR contains documentation +- [ ] this PR contains unit tests +- [ ] this PR has been tested for backwards compatibility From 30ddb4a42974354782d8cd07946ae8df3ef8fa7d Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Fri, 19 Jul 2024 15:44:46 -0400 Subject: [PATCH 02/19] Create build-test.yml adding first workflow Signed-off-by: Robert Sirchia Signed-off-by: Robert Sirchia --- .github/workflows/build-test.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/build-test.yml diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..f0d341e --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,28 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: build-test + +on: + push: + branches: + - 'main' + - 'release-**' + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout source code + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.22' + - name: Run Test + run: make test + - name: Build + run: make build From c3f98a80b2c55ee4066a00938edeb98133c61b81 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Fri, 19 Jul 2024 15:48:58 -0400 Subject: [PATCH 03/19] Correcting typo in build-test.yml. Signed-off-by: Robert Sirchia --- .github/workflows/build-test.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f0d341e..1001a14 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -5,9 +5,9 @@ name: build-test on: push: - branches: - - 'main' - - 'release-**' + branches: + - "main" + - "release-**" pull_request: branches: - main @@ -16,13 +16,13 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout source code - - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.22' - - name: Run Test - run: make test - - name: Build - run: make build + - name: Checkout source code + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.22" + - name: Run Test + run: make test + - name: Build + run: make build From 675057c75c034fc6702a39ff6a3162671e674e39 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Tue, 23 Jul 2024 17:20:47 -0400 Subject: [PATCH 04/19] Making changes as per feedback. Signed-off-by: Robert Sirchia --- .github/dependabot.yml | 4 ---- .github/pull_request_template.md | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 10ff906..4155996 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,10 +5,6 @@ updates: directory: "/" schedule: interval: "daily" - groups: - k8s.io: - patterns: - - "k8s.io/client-go" - package-ecosystem: "github-actions" directory: "/" schedule: diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index cda9086..2c89be4 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,5 +1,6 @@ **What this PR does / why we need it**: From 17e8dd6d2e99e2254ac8eacd28b3f4b3a1a82ff7 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Wed, 24 Jul 2024 15:37:35 -0400 Subject: [PATCH 05/19] Adding golangci-lint GitHub action for linting replacing linting done in CircleCI. Signed-off-by: Robert Sirchia --- .github/workflows/golangci-lint.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/golangci-lint.yml diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000..2a28fee --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,21 @@ +name: golangci-lint + +on: + push: + pull_request: + +jobs: + golangci: + name: golangci-lint + runs-on: ubuntu-latest + steps: + - name: Checkout source code + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.22" + - name: golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.58 From 9fd83ffc66f2a5b73e1f680337e530aa5bb7bbf9 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Wed, 24 Jul 2024 15:59:00 -0400 Subject: [PATCH 06/19] Adding config for SLSA Go Releaser as per the documentation here: https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/go/README.md#configuration-file Signed-off-by: Robert Sirchia --- .slsa-goreleaser.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .slsa-goreleaser.yml diff --git a/.slsa-goreleaser.yml b/.slsa-goreleaser.yml new file mode 100644 index 0000000..19eaffd --- /dev/null +++ b/.slsa-goreleaser.yml @@ -0,0 +1,29 @@ +# Version for this file. +version: 1 + +# (Optional) List of env variables used during compilation. +env: + - GO111MODULE=on + - CGO_ENABLED=0 + +# (Optional) Flags for the compiler. +flags: + - -LDFLAGS + +# The OS to compile for. `GOOS` env variable will be set to this value. +goos: linux + +# The architecture to compile for. `GOARCH` env variable will be set to this value. +goarch: amd64 + +# Binary output name. +# {{ .Os }} will be replaced by goos field in the config file. +# {{ .Arch }} will be replaced by goarch field in the config file. +binary: binary-{{ .Os }}-{{ .Arch }} + +# (Optional) ldflags generated dynamically in the workflow, and set as the `evaluated-envs` input variables in the workflow. +ldflags: + - "-X main.Version={{ .Env.VERSION }}" + - "-X main.Commit={{ .Env.COMMIT }}" + - "-X main.CommitDate={{ .Env.COMMIT_DATE }}" + - "-X main.TreeState={{ .Env.TREE_STATE }}" From 88cf633ee80a969b0ed029c0f02241380746cc52 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Wed, 24 Jul 2024 16:11:34 -0400 Subject: [PATCH 07/19] Adding workflow for go slsa releaser. Signed-off-by: Robert Sirchia --- .github/workflows/go-slsa3-release.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/go-slsa3-release.yml diff --git a/.github/workflows/go-slsa3-release.yml b/.github/workflows/go-slsa3-release.yml new file mode 100644 index 0000000..065b04f --- /dev/null +++ b/.github/workflows/go-slsa3-release.yml @@ -0,0 +1,24 @@ +name: SLSA Go releaser +on: + workflow_dispatch: + release: + types: [created] + +permissions: read-all + +jobs: + # ======================================================================================================================================== + # Prerequesite: Create a .slsa-goreleaser.yml in the root directory of your project. + # See format in https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/go/README.md#configuration-file + #========================================================================================================================================= + build: + permissions: + id-token: write # To sign. + contents: write # To upload release assets. + actions: read # To read workflow path. + uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.4.0 + with: + go-version: 1.22 + # ============================================================================================================= + # Optional: For more options, see https://github.com/slsa-framework/slsa-github-generator#golang-projects + # ============================================================================================================= From 6e136b5572c99662fe5f1548b5facc09c7b521ad Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Thu, 25 Jul 2024 08:39:03 -0400 Subject: [PATCH 08/19] Updated with old package reference. Signed-off-by: Robert Sirchia --- pkg/mapping/mapfile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/mapping/mapfile.go b/pkg/mapping/mapfile.go index d056aa6..29f9161 100644 --- a/pkg/mapping/mapfile.go +++ b/pkg/mapping/mapfile.go @@ -17,14 +17,14 @@ limitations under the License. package mapping import ( - "io/ioutil" + "os" "sigs.k8s.io/yaml" ) // LoadMapfile loads a Map.yaml file into a *Metadata. func LoadMapfile(filename string) (*Metadata, error) { - b, err := ioutil.ReadFile(filename) + b, err := os.ReadFile(filename) if err != nil { return nil, err } From d7883e333a6bf12c4a6f98dbdfd75e44dbf27197 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Thu, 25 Jul 2024 09:31:54 -0400 Subject: [PATCH 09/19] Fixing linting error. Signed-off-by: Robert Sirchia --- cmd/mapkubeapis/map.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/mapkubeapis/map.go b/cmd/mapkubeapis/map.go index aa2efe1..bef5c40 100644 --- a/cmd/mapkubeapis/map.go +++ b/cmd/mapkubeapis/map.go @@ -61,6 +61,7 @@ func newMapCmd(out io.Writer, args []string) *cobra.Command { } flags := cmd.PersistentFlags() + flags.ParseErrorsWhitelist.UnknownFlags = true flags.Parse(args) settings = new(EnvSettings) From 7007730879c88b4529b9b6593462355651e25e87 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Thu, 25 Jul 2024 10:12:49 -0400 Subject: [PATCH 10/19] Fixing linting errors and updating .getignore. Signed-off-by: Robert Sirchia --- .gitignore | 2 ++ cmd/mapkubeapis/map.go | 11 +++++++++-- pkg/v3/connect.go | 5 ++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 13ab009..84ec399 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ bin/ dist/ tmp/ releases/ + +.idea/ diff --git a/cmd/mapkubeapis/map.go b/cmd/mapkubeapis/map.go index bef5c40..09a606b 100644 --- a/cmd/mapkubeapis/map.go +++ b/cmd/mapkubeapis/map.go @@ -49,7 +49,10 @@ func newMapCmd(out io.Writer, args []string) *cobra.Command { SilenceUsage: true, Args: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { - cmd.Help() + err := cmd.Help() + if err != nil { + return err + } os.Exit(1) } else if len(args) > 1 { return errors.New("only one release name may be passed at a time") @@ -62,7 +65,11 @@ func newMapCmd(out io.Writer, args []string) *cobra.Command { flags := cmd.PersistentFlags() flags.ParseErrorsWhitelist.UnknownFlags = true - flags.Parse(args) + err := flags.Parse(args) + if err != nil { + return nil + } + settings = new(EnvSettings) // Get the default mapping file diff --git a/pkg/v3/connect.go b/pkg/v3/connect.go index 87226b4..1f34d04 100644 --- a/pkg/v3/connect.go +++ b/pkg/v3/connect.go @@ -55,6 +55,9 @@ func GetActionConfig(namespace string, kubeConfig common.KubeConfig) (*action.Co func debug(format string, v ...interface{}) { if settings.Debug { format = fmt.Sprintf("[debug] %s\n", format) - log.Output(2, fmt.Sprintf(format, v...)) + err := log.Output(2, fmt.Sprintf(format, v...)) + if err != nil { + return + } } } From 7b3a5c39a4b47d4d5bd6cc279bb197aac71a9f86 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Thu, 25 Jul 2024 11:44:54 -0400 Subject: [PATCH 11/19] updating the workflow to add version. Signed-off-by: Robert Sirchia --- .github/workflows/go-slsa3-release.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go-slsa3-release.yml b/.github/workflows/go-slsa3-release.yml index 065b04f..1d10ab7 100644 --- a/.github/workflows/go-slsa3-release.yml +++ b/.github/workflows/go-slsa3-release.yml @@ -7,10 +7,14 @@ on: permissions: read-all jobs: - # ======================================================================================================================================== - # Prerequesite: Create a .slsa-goreleaser.yml in the root directory of your project. - # See format in https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/go/README.md#configuration-file - #========================================================================================================================================= + args: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.ldflags.outputs.version }} + steps: + - id: ldflags + run: | + echo "version=$(git describe --tags --always --dirty | cut -c2-)" >> "$GITHUB_OUTPUT" build: permissions: id-token: write # To sign. @@ -19,6 +23,4 @@ jobs: uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.4.0 with: go-version: 1.22 - # ============================================================================================================= - # Optional: For more options, see https://github.com/slsa-framework/slsa-github-generator#golang-projects - # ============================================================================================================= + evaluated-envs: "VERSION:${{needs.args.outputs.version}}" From 019ff73846160e9eacddf58267146ef695d9a8d7 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Thu, 25 Jul 2024 12:17:41 -0400 Subject: [PATCH 12/19] addressing error on private repository. Signed-off-by: Robert Sirchia --- .github/workflows/go-slsa3-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/go-slsa3-release.yml b/.github/workflows/go-slsa3-release.yml index 1d10ab7..130ba73 100644 --- a/.github/workflows/go-slsa3-release.yml +++ b/.github/workflows/go-slsa3-release.yml @@ -23,4 +23,5 @@ jobs: uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.4.0 with: go-version: 1.22 + private-repository: true evaluated-envs: "VERSION:${{needs.args.outputs.version}}" From 5f9a27b3fc326b60c78e371a88ac1034180661cc Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Thu, 25 Jul 2024 13:14:36 -0400 Subject: [PATCH 13/19] moving the private-repository: true flag based on the documentation Signed-off-by: Robert Sirchia --- .github/workflows/go-slsa3-release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go-slsa3-release.yml b/.github/workflows/go-slsa3-release.yml index 130ba73..e6232ec 100644 --- a/.github/workflows/go-slsa3-release.yml +++ b/.github/workflows/go-slsa3-release.yml @@ -3,9 +3,11 @@ on: workflow_dispatch: release: types: [created] + workflow_call: + inputs: + private-repository: true permissions: read-all - jobs: args: runs-on: ubuntu-latest @@ -23,5 +25,4 @@ jobs: uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.4.0 with: go-version: 1.22 - private-repository: true evaluated-envs: "VERSION:${{needs.args.outputs.version}}" From 4e6e2dc881d1616d7ad66d1e049d90591f79bc4f Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Thu, 25 Jul 2024 13:57:42 -0400 Subject: [PATCH 14/19] moving to the standard goreleaser for the time being. Signed-off-by: Robert Sirchia --- .github/workflows/go-slsa3-release.yml | 3 --- .github/workflows/goreleaser.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/goreleaser.yml diff --git a/.github/workflows/go-slsa3-release.yml b/.github/workflows/go-slsa3-release.yml index e6232ec..9d1f08e 100644 --- a/.github/workflows/go-slsa3-release.yml +++ b/.github/workflows/go-slsa3-release.yml @@ -3,9 +3,6 @@ on: workflow_dispatch: release: types: [created] - workflow_call: - inputs: - private-repository: true permissions: read-all jobs: diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml new file mode 100644 index 0000000..e2785c9 --- /dev/null +++ b/.github/workflows/goreleaser.yml @@ -0,0 +1,26 @@ +name: goreleaser + +on: + pull_request: + push: + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - + name: Set Up Go + uses: actions/setup-go@v5 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser \ No newline at end of file From 3ae644a95b52a19475f9ba12d3bdcb28ad626547 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Thu, 25 Jul 2024 14:02:42 -0400 Subject: [PATCH 15/19] added args Signed-off-by: Robert Sirchia --- .github/workflows/goreleaser.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index e2785c9..4500eda 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -23,4 +23,6 @@ jobs: name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: - distribution: goreleaser \ No newline at end of file + distribution: goreleaser + version: '~> v2' + args: release --clean \ No newline at end of file From 923137bb8a2f8b8c49b97c32a86204af27b6ae6f Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Fri, 26 Jul 2024 09:13:49 -0400 Subject: [PATCH 16/19] fixing goreleaser action. Signed-off-by: Robert Sirchia --- .github/workflows/goreleaser.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 4500eda..02a609d 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -25,4 +25,6 @@ jobs: with: distribution: goreleaser version: '~> v2' - args: release --clean \ No newline at end of file + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From b3e5ee0db945bc9f1573452925e8c98928523aa4 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Fri, 26 Jul 2024 10:00:49 -0400 Subject: [PATCH 17/19] removing unused releaser. Signed-off-by: Robert Sirchia --- .github/workflows/go-slsa3-release.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/go-slsa3-release.yml diff --git a/.github/workflows/go-slsa3-release.yml b/.github/workflows/go-slsa3-release.yml deleted file mode 100644 index 9d1f08e..0000000 --- a/.github/workflows/go-slsa3-release.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: SLSA Go releaser -on: - workflow_dispatch: - release: - types: [created] - -permissions: read-all -jobs: - args: - runs-on: ubuntu-latest - outputs: - version: ${{ steps.ldflags.outputs.version }} - steps: - - id: ldflags - run: | - echo "version=$(git describe --tags --always --dirty | cut -c2-)" >> "$GITHUB_OUTPUT" - build: - permissions: - id-token: write # To sign. - contents: write # To upload release assets. - actions: read # To read workflow path. - uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.4.0 - with: - go-version: 1.22 - evaluated-envs: "VERSION:${{needs.args.outputs.version}}" From cb1080b873506d2ff031047c4cbcb2a5f583d752 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Fri, 26 Jul 2024 10:36:42 -0400 Subject: [PATCH 18/19] adding the correct triggers for goreleaser action. Signed-off-by: Robert Sirchia --- .github/workflows/goreleaser.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 02a609d..e7c6552 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -1,8 +1,12 @@ name: goreleaser on: - pull_request: + create: + tags: + - v* push: + branches: + - main permissions: contents: write From de944df596e74c07408d459915691924acf20ebf Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Fri, 26 Jul 2024 15:27:55 -0400 Subject: [PATCH 19/19] removing unused slsa file. Signed-off-by: Robert Sirchia --- .slsa-goreleaser.yml | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 .slsa-goreleaser.yml diff --git a/.slsa-goreleaser.yml b/.slsa-goreleaser.yml deleted file mode 100644 index 19eaffd..0000000 --- a/.slsa-goreleaser.yml +++ /dev/null @@ -1,29 +0,0 @@ -# Version for this file. -version: 1 - -# (Optional) List of env variables used during compilation. -env: - - GO111MODULE=on - - CGO_ENABLED=0 - -# (Optional) Flags for the compiler. -flags: - - -LDFLAGS - -# The OS to compile for. `GOOS` env variable will be set to this value. -goos: linux - -# The architecture to compile for. `GOARCH` env variable will be set to this value. -goarch: amd64 - -# Binary output name. -# {{ .Os }} will be replaced by goos field in the config file. -# {{ .Arch }} will be replaced by goarch field in the config file. -binary: binary-{{ .Os }}-{{ .Arch }} - -# (Optional) ldflags generated dynamically in the workflow, and set as the `evaluated-envs` input variables in the workflow. -ldflags: - - "-X main.Version={{ .Env.VERSION }}" - - "-X main.Commit={{ .Env.COMMIT }}" - - "-X main.CommitDate={{ .Env.COMMIT_DATE }}" - - "-X main.TreeState={{ .Env.TREE_STATE }}"