diff --git a/.github/actions/golang/action.yaml b/.github/actions/golang/action.yaml deleted file mode 100644 index 890c4bb3cd..0000000000 --- a/.github/actions/golang/action.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: setup-go -description: "Setup Go binary and caching" - -runs: - using: composite - steps: - - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 - with: - go-version-file: 'go.mod' - cache: true diff --git a/.github/workflows/check-go-mod.yml b/.github/workflows/check-go-mod.yml index 8efdd95beb..e7b8c7514e 100644 --- a/.github/workflows/check-go-mod.yml +++ b/.github/workflows/check-go-mod.yml @@ -14,7 +14,9 @@ jobs: uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Test go mod run: | diff --git a/.github/workflows/nightly-ecr.yml b/.github/workflows/nightly-ecr.yml index 4be6e1ebcb..6607ac39f1 100644 --- a/.github/workflows/nightly-ecr.yml +++ b/.github/workflows/nightly-ecr.yml @@ -22,7 +22,9 @@ jobs: uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Build the Zarf binary run: make build-cli-linux-amd diff --git a/.github/workflows/nightly-eks.yml b/.github/workflows/nightly-eks.yml index fa347c2a8c..3c9a20838b 100644 --- a/.github/workflows/nightly-eks.yml +++ b/.github/workflows/nightly-eks.yml @@ -30,7 +30,9 @@ jobs: uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Build binary and zarf packages uses: ./.github/actions/packages diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ec2f6839c..91a634e237 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,9 @@ jobs: fetch-depth: 0 - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Install tools uses: ./.github/actions/install-tools @@ -107,7 +109,9 @@ jobs: path: build/ - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Make Zarf executable run: | @@ -140,7 +144,9 @@ jobs: fetch-depth: 0 - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Install tools uses: ./.github/actions/install-tools diff --git a/.github/workflows/scan-codeql.yml b/.github/workflows/scan-codeql.yml index 5657653ffc..3d55a8354c 100644 --- a/.github/workflows/scan-codeql.yml +++ b/.github/workflows/scan-codeql.yml @@ -39,7 +39,9 @@ jobs: uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/scan-docs-and-schema.yml b/.github/workflows/scan-docs-and-schema.yml index d1228c2fd4..19c7ad3c34 100644 --- a/.github/workflows/scan-docs-and-schema.yml +++ b/.github/workflows/scan-docs-and-schema.yml @@ -14,7 +14,9 @@ jobs: uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Docs and schemas run: "make test-docs-and-schema" diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index ae4d719f1f..3ce5d01201 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -38,7 +38,9 @@ jobs: uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Build binary and zarf packages uses: ./.github/actions/packages @@ -67,7 +69,9 @@ jobs: path: build/ - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Make Zarf executable run: | @@ -102,7 +106,9 @@ jobs: path: build/ - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Setup K3d uses: ./.github/actions/k3d @@ -144,7 +150,9 @@ jobs: path: build/ - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Make Zarf executable run: | @@ -182,7 +190,9 @@ jobs: path: build/ - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Setup Kind run: | @@ -226,7 +236,9 @@ jobs: path: build/ - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Setup Minikube run: minikube start --driver=docker diff --git a/.github/workflows/test-external.yml b/.github/workflows/test-external.yml index 1dc1b5b641..ad8937a537 100644 --- a/.github/workflows/test-external.yml +++ b/.github/workflows/test-external.yml @@ -37,7 +37,9 @@ jobs: uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Build binary and zarf packages uses: ./.github/actions/packages diff --git a/.github/workflows/test-import.yaml b/.github/workflows/test-import.yaml index 201eb2f7db..44831ca1a9 100644 --- a/.github/workflows/test-import.yaml +++ b/.github/workflows/test-import.yaml @@ -20,8 +20,7 @@ jobs: - name: Setup Go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: - go-version-file: 'go.mod' - cache: true + go-version-file: go.mod - name: Run test Go program that imports Zarf run: | diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index cec2d23eda..12ecb42a77 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -41,7 +41,9 @@ jobs: uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Run unit tests run: make test-unit diff --git a/.github/workflows/test-upgrade.yml b/.github/workflows/test-upgrade.yml index 8922a88cb0..7bf6516bd3 100644 --- a/.github/workflows/test-upgrade.yml +++ b/.github/workflows/test-upgrade.yml @@ -37,7 +37,9 @@ jobs: uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Build PR binary and zarf init package uses: ./.github/actions/packages @@ -66,7 +68,9 @@ jobs: path: build/ - name: Setup golang - uses: ./.github/actions/golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod - name: Make Zarf executable run: | diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 21cca72af2..a99d064196 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -36,6 +36,11 @@ jobs: - name: Checkout uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - name: Setup golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod + - name: Run Windows unit tests run: make test-unit shell: pwsh @@ -46,6 +51,11 @@ jobs: - name: Checkout uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - name: Setup golang + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version-file: go.mod + - name: Build Windows binary and zarf packages uses: ./.github/actions/packages with: