Skip to content

Commit

Permalink
Use HC Actions Go Build
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Eckert committed Oct 27, 2022
1 parent 484ba7d commit 536f034
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
27 changes: 10 additions & 17 deletions .github/workflows/reusable-acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,17 @@ jobs:
with:
ref: ${{ inputs.checkout-ref }}

- name: Setup go
uses: actions/setup-go@v3
- name: Build Consul K8s CLI
uses: hashicorp/actions-go-build@v0.1.3
with:
go-version: ${{ inputs.go-version }}

- name: Setup go mod cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
product_name: consul-k8s
go_version: ${{ inputs.go-version }}
os: linux
arch: amd64
reproducible: assert
instructions: |
sudo make cli-dev
consul-k8s version
- name: Install pre-requisites # Install gotestsum, kind, kubectl, and helm
run: |
Expand All @@ -97,10 +94,6 @@ jobs:
- run: mkdir -p ${{ env.TEST_RESULTS }}

- name: go mod download
working-directory: ${{ inputs.directory }}
run: go mod download

- name: Create kind clusters
run: |
kind create cluster --name dc1 --image kindest/node:${{ inputs.kind-version }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ jobs:

acceptance:
needs: [ get-product-version, dev-upload-docker, get-go-version ]
uses: hashicorp/consul-k8s/.github/workflows/reusable-acceptance.yml@main
uses: hashicorp/consul-k8s/.github/workflows/reusable-acceptance.yml@te/use-hc-actions-build
with:
name: acceptance
directory: acceptance/tests
Expand All @@ -357,7 +357,7 @@ jobs:

acceptance-tproxy:
needs: [ get-product-version, dev-upload-docker, get-go-version ]
uses: hashicorp/consul-k8s/.github/workflows/reusable-acceptance.yml@main
uses: hashicorp/consul-k8s/.github/workflows/reusable-acceptance.yml@te/use-hc-actions-build
with:
name: acceptance-tproxy
directory: acceptance/tests
Expand All @@ -370,7 +370,7 @@ jobs:

acceptance-cni:
needs: [ get-product-version, dev-upload-docker, get-go-version ]
uses: hashicorp/consul-k8s/.github/workflows/reusable-acceptance.yml@main
uses: hashicorp/consul-k8s/.github/workflows/reusable-acceptance.yml@te/use-hc-actions-build
with:
name: acceptance
directory: acceptance/tests
Expand Down

0 comments on commit 536f034

Please sign in to comment.