File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Docker
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ permissions :
9+ contents : read
10+ packages : write
11+
12+ jobs :
13+ docker :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0
21+
22+ - name : Set up Docker Buildx
23+ uses : docker/setup-buildx-action@v3
24+
25+ - name : Get version
26+ id : version
27+ run : echo "version=$(git describe --tags --always --dirty)" >> $GITHUB_OUTPUT
28+
29+ - name : Log in to GitHub Container Registry
30+ uses : docker/login-action@v3
31+ with :
32+ registry : ghcr.io
33+ username : ${{ github.actor }}
34+ password : ${{ secrets.GITHUB_TOKEN }}
35+
36+ - name : Extract metadata
37+ id : meta
38+ uses : docker/metadata-action@v5
39+ with :
40+ images : ghcr.io/${{ github.repository }}
41+ tags : |
42+ type=raw,value=${{ steps.version.outputs.version }}
43+ type=raw,value=latest,enable={{is_default_branch}}
44+
45+ - name : Build and push Docker image
46+ uses : docker/build-push-action@v5
47+ with :
48+ context : .
49+ platforms : linux/amd64,linux/arm64
50+ push : true
51+ tags : ${{ steps.meta.outputs.tags }}
52+ labels : ${{ steps.meta.outputs.labels }}
53+ build-args : |
54+ VERSION=${{ steps.version.outputs.version }}
55+
Original file line number Diff line number Diff line change @@ -13,12 +13,17 @@ jobs:
1313 build :
1414 runs-on : ubuntu-latest
1515 steps :
16- - uses : actions/checkout@v2
16+ - uses : actions/checkout@v4
1717
1818 - name : Set up Go
19- uses : actions/setup-go@v2
19+ uses : actions/setup-go@v5
2020 with :
21- go-version : 1.16
21+ go-version-file : ' go.mod'
22+
23+ - name : golangci-lint
24+ uses : golangci/golangci-lint-action@v6
25+ with :
26+ version : latest
2227
2328 - name : Build
2429 run : go build -v ./...
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ goreleaser :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
19+
20+ - name : Set up Go
21+ uses : actions/setup-go@v5
22+ with :
23+ go-version-file : ' go.mod'
24+
25+ - name : Run GoReleaser
26+ uses : goreleaser/goreleaser-action@v6
27+ with :
28+ distribution : goreleaser
29+ version : ' ~> v2'
30+ args : release --clean
31+ env :
32+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments