-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (57 loc) · 1.95 KB
/
Copy pathgo.yml
File metadata and controls
62 lines (57 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This workflow builds and checks the Terraform provider on every PR.
name: Go
on:
pull_request:
branches: [ "*" ]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Configure SSH Agent
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.TETRATE_CI_SSH_PRIVATE_KEY }}
- name: Disable Strict Host Key Checking for SSH
run: mkdir -p ~/.ssh && echo -e "\tStrictHostKeyChecking no" >> ~/.ssh/config && ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Pull over SSH instead of HTTPS
run: echo -e '[url "git@github.com:"]\n\tinsteadOf = https://github.com/' | sudo tee /etc/gitconfig
- name: Install tfplugindocs prerequisite (terraform CLI)
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
- name: Verify generated code, docs, and formatting are up to date
run: make check
env:
GOPRIVATE: github.com/tetrateio/*
build:
runs-on: ubuntu-latest
needs: check
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Configure SSH Agent
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.TETRATE_CI_SSH_PRIVATE_KEY }}
- name: Disable Strict Host Key Checking for SSH
run: mkdir -p ~/.ssh && echo -e "\tStrictHostKeyChecking no" >> ~/.ssh/config && ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Pull over SSH instead of HTTPS
run: echo -e '[url "git@github.com:"]\n\tinsteadOf = https://github.com/' | sudo tee /etc/gitconfig
- name: Build
run: make build
env:
GOPRIVATE: github.com/tetrateio/*
- name: Test
run: make test
env:
GOPRIVATE: github.com/tetrateio/*