File tree Expand file tree Collapse file tree 4 files changed +59
-94
lines changed
Expand file tree Collapse file tree 4 files changed +59
-94
lines changed Original file line number Diff line number Diff line change 1+ name : ci
2+
3+ on :
4+ push :
5+ branches : [main] # pushes TO main
6+ pull_request :
7+ branches : [main] # pull requests AGAINST main
8+
9+ # cancel CI runs when a new commit is pushed to any branch except main
10+ concurrency :
11+ group : " test-${{ github.ref }}"
12+ cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
13+
14+ jobs :
15+ test :
16+ runs-on : ubuntu-latest
17+
18+ strategy :
19+ matrix :
20+ # build against the two latest releases, to match golang's release
21+ # policy: https://go.dev/doc/devel/release#policy
22+ go-version :
23+ - ' stable'
24+ - ' oldstable'
25+
26+ steps :
27+ - uses : actions/setup-go@v5
28+ with :
29+ go-version : ${{matrix.go-version}}
30+
31+ - uses : actions/checkout@v4
32+
33+ - name : test
34+ run : make testci
35+
36+ - uses : codecov/codecov-action@v3
37+ with :
38+ files : ./coverage.out
39+ if : ${{ matrix.go-version == 'stable' }}
40+
41+ lint :
42+ runs-on : ubuntu-latest
43+ steps :
44+ - uses : actions/checkout@v4
45+
46+ - uses : actions/setup-go@v5
47+ with :
48+ go-version : ' stable'
49+
50+ - uses : golangci/golangci-lint-action@v3
51+ with :
52+ version : latest
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -15,30 +15,24 @@ jobs:
1515 docker :
1616 runs-on : ubuntu-latest
1717 steps :
18- - name : Check out the repo
19- uses : actions/checkout@v3
18+ - uses : actions/checkout@v4
2019
21- - name : Set up QEMU
22- uses : docker/setup-qemu-action@v2
20+ - uses : docker/setup-qemu-action@v2
2321
24- - name : Set up Docker Buildx
25- uses : docker/setup-buildx-action@v2
22+ - uses : docker/setup-buildx-action@v2
2623
27- - name : Login to Docker Hub
28- uses : docker/login-action@v2
24+ - uses : docker/login-action@v2
2925 with :
3026 username : ${{ secrets.DOCKERHUB_USERNAME }}
3127 password : ${{ secrets.DOCKERHUB_TOKEN }}
3228
33- - name : Extract metadata for Docker
34- id : meta
35- uses : docker/metadata-action@v4
29+ - uses : docker/metadata-action@v4
3630 with :
3731 images : |
3832 mccutchen/go-httpbin
33+ id : meta
3934
40- - name : Build and push
41- uses : docker/build-push-action@v3
35+ - uses : docker/build-push-action@v3
4236 with :
4337 platforms : linux/amd64,linux/arm64
4438 push : true
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments