| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
name: Go |
| 5 |
|
| 6 |
on: |
| 7 |
push: |
| 8 |
branches: [ "main" ] |
| 9 |
pull_request: |
| 10 |
branches: [ "main" ] |
| 11 |
|
| 12 |
permissions: {} |
| 13 |
|
| 14 |
jobs: |
| 15 |
|
| 16 |
build: |
| 17 |
permissions: |
| 18 |
contents: read |
| 19 |
runs-on: ubuntu-latest |
| 20 |
steps: |
| 21 |
- name: Harden the runner (Audit all outbound calls) |
| 22 |
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 |
| 23 |
with: |
| 24 |
egress-policy: audit |
| 25 |
|
| 26 |
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 |
| 27 |
with: |
| 28 |
persist-credentials: false |
| 29 |
|
| 30 |
- name: Set up Go |
| 31 |
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c |
| 32 |
with: |
| 33 |
go-version-file: './go.mod' |
| 34 |
|
| 35 |
- name: Build |
| 36 |
run: go build -v ./... |
| 37 |
|
| 38 |
- name: Test |
| 39 |
run: go test -v ./... |