From b1dcdb9cf890973795d46f154485a95490a8856f Mon Sep 17 00:00:00 2001 From: Ian Lewis Date: Tue, 28 Feb 2023 00:09:52 +0000 Subject: [PATCH] adjust file names Signed-off-by: Ian Lewis --- .../config-ldflags-workflow_dispatch.yml | 14 ++++++++++++++ ...er-e2e.all.workflow_dispatch.main.all.slsa3.yml | 7 +++++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 .github/configs-go/config-ldflags-workflow_dispatch.yml diff --git a/.github/configs-go/config-ldflags-workflow_dispatch.yml b/.github/configs-go/config-ldflags-workflow_dispatch.yml new file mode 100644 index 0000000000..c7caeb65db --- /dev/null +++ b/.github/configs-go/config-ldflags-workflow_dispatch.yml @@ -0,0 +1,14 @@ +# Used for e2e tests. +# TODO: update with various config parameters. +version: 1 +env: + - GO111MODULE=on + - CGO_ENABLED=0 + +flags: + - -trimpath + - -tags=netgo + +goos: linux +goarch: amd64 +binary: gha_go-binary-{{ .Os }}-{{ .Arch }}-workflow_dispatch diff --git a/.github/workflows/verifier-e2e.all.workflow_dispatch.main.all.slsa3.yml b/.github/workflows/verifier-e2e.all.workflow_dispatch.main.all.slsa3.yml index 73e7447adb..ee4f971471 100644 --- a/.github/workflows/verifier-e2e.all.workflow_dispatch.main.all.slsa3.yml +++ b/.github/workflows/verifier-e2e.all.workflow_dispatch.main.all.slsa3.yml @@ -34,13 +34,15 @@ jobs: run: | if [ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]; then echo "::set-output name=binary-name::gha_generic-binary-linux-amd64-workflow_dispatch" + echo "::set-output name=config-file::.github/configs-go/config-ldflags-workflow_dispatch.yml" exit 0 fi # This must be a tag event. echo "::set-output name=binary-name::gha_generic-binary-linux-amd64-${GITHUB_REF_NAME}" + echo "::set-output name=config-file::.github/configs-go/config-ldflags-tag-name.yml" build: - needs: generate_name + needs: [generate_name] env: BINARY_NAME: ${{ needs.generate_name.outputs.binary-name }} outputs: @@ -87,6 +89,7 @@ jobs: upload-assets: true gha_go: + needs: [generate_name] permissions: id-token: write # For signing. contents: write # For asset uploads. @@ -95,7 +98,7 @@ jobs: with: go-version: 1.18 # We cannot use ${{ env.CONFIG_FILE }} because env variables are not available. - config-file: .github/configs-go/config-ldflags-tag-name.yml + config-file: ${{ needs.generate_name.outputs.config-file }} container_build: env: