Skip to content

Apply GitHub workflow changes #4

Apply GitHub workflow changes

Apply GitHub workflow changes #4

name: Check examples
on:
push:
branches:
- main
paths:
- "_examples/kubernetes_manifest/**"
- "**.go"
pull_request:
branches:
- main
paths:
- "_examples/kubernetes_manifest/**"
- "**.go"
workflow_dispatch:
env:
KUBECONFIG: ${{ github.workspace }}/.kube/config
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
terraform_version:
- "1.0.11"
- "1.1.9"
- "1.2.9"
- "1.3.9"
- "1.4.0"
env:
TF_X_KUBERNETES_MANIFEST_RESOURCE: 1
TERM: linux
steps:
- uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
with:
terraform_version: ${{ matrix.terraform_version }}
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Set up Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file: 'go.mod'
- name: Go mod verify
run: go mod verify
- name: Go build
run: go build
- name: Setup kind
uses: helm/kind-action@fa81e57adff234b2908110485695db0f181f3c67 # v1.7.0
with:
wait: 2m
version: "v0.17.0" # Kubernetes version: 1.25.X
- name: Check examples run
env:
KUBE_CONFIG_PATH: ${{ env.KUBECONFIG }}
run: ./manifest/scripts/check_examples.sh