Skip to content

Commit 6ce5715

Browse files
committed
uplift Go and Github action runners
Uplifts Go to 1.21 and hardens our Github action runners. Signed-off-by: Jay Pipes <jaypipes@gmail.com>
1 parent be1a026 commit 6ce5715

File tree

5 files changed

+80
-3
lines changed

5 files changed

+80
-3
lines changed

.github/workflows/fmtcheck.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: fmtcheck
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
fmtcheck:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: harden runner
17+
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1
18+
with:
19+
egress-policy: block
20+
disable-sudo: true
21+
allowed-endpoints: >
22+
github.com:443
23+
api.github.com:443
24+
proxy.github.com:443
25+
proxy.golang.org:443
26+
raw.githubusercontent.com:443
27+
objects.githubusercontent.com:443
28+
proxy.golang.org:443
29+
- name: checkout code
30+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
31+
- name: setup go
32+
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
33+
with:
34+
go-version: 1.21
35+
- name: check fmt
36+
run: 'bash -c "diff -u <(echo -n) <(gofmt -d .)"'

.github/workflows/lint.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: lint
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
pull-requests: read # needed for only-new-issues option below
12+
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: harden runner
18+
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1
19+
with:
20+
egress-policy: block
21+
disable-sudo: true
22+
allowed-endpoints: >
23+
github.com:443
24+
api.github.com:443
25+
proxy.github.com:443
26+
proxy.golang.org:443
27+
raw.githubusercontent.com:443
28+
objects.githubusercontent.com:443
29+
proxy.golang.org:443
30+
- name: checkout code
31+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
32+
- name: setup go
33+
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
34+
with:
35+
go-version: 1.21
36+
- name: lint
37+
uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 # v3.6.0
38+
with:
39+
version: v1.53
40+
args: --timeout=5m0s --verbose
41+
only-new-issues: true

.github/workflows/gate-tests.yml renamed to .github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: gate tests
1+
name: test
22

33
on:
44
push:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Go Reference](https://pkg.go.dev/badge/github.com/gdt-dev/gdt.svg)](https://pkg.go.dev/github.com/gdt-dev/gdt)
44
[![Go Report Card](https://goreportcard.com/badge/github.com/gdt-dev/gdt)](https://goreportcard.com/report/github.com/gdt-dev/gdt)
5-
[![Build Status](https://github.com/gdt-dev/gdt/actions/workflows/gate-tests.yml/badge.svg?branch=main)](https://github.com/gdt-dev/gdt/actions)
5+
[![Build Status](https://github.com/gdt-dev/gdt/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/gdt-dev/gdt/actions)
66
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
77

88
<div style="float: left">

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/gdt-dev/gdt
22

3-
go 1.19
3+
go 1.21
44

55
require (
66
github.com/PaesslerAG/jsonpath v0.1.1

0 commit comments

Comments
 (0)