File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Create and publish a Docker image
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ env :
9+ REGISTRY : ghcr.io
10+ IMAGE_NAME : ${{ github.repository }}
11+
12+ jobs :
13+ build-and-push-image :
14+ runs-on : ubuntu-latest
15+ permissions :
16+ contents : read
17+ packages : write
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v2
22+
23+ - name : Log in to the Container registry
24+ uses : docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
25+ with :
26+ registry : ${{ env.REGISTRY }}
27+ username : ${{ github.actor }}
28+ password : ${{ secrets.GITHUB_TOKEN }}
29+
30+ - name : Extract metadata (tags, labels) for Docker
31+ id : meta
32+ uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
33+ with :
34+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
35+
36+ - name : Build and push Docker image
37+ uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
38+ with :
39+ context : .
40+ push : true
41+ tags : ${{ steps.meta.outputs.tags }}
42+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1+ name : goreleaser
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ goreleaser :
13+ runs-on : ubuntu-latest
14+ steps :
15+ -
16+ name : Checkout
17+ uses : actions/checkout@v2
18+ with :
19+ fetch-depth : 0
20+ -
21+ name : Set up Go
22+ uses : actions/setup-go@v2
23+ with :
24+ go-version : 1.17
25+ -
26+ name : Run GoReleaser
27+ uses : goreleaser/goreleaser-action@v2
28+ with :
29+ distribution : goreleaser
30+ version : latest
31+ args : release --rm-dist
32+ env :
33+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ dist /
Original file line number Diff line number Diff line change 1+ before :
2+ hooks :
3+ - go mod tidy
4+ builds :
5+ - env :
6+ - CGO_ENABLED=0
7+ goos :
8+ - linux
9+ - windows
10+ - darwin
11+ checksum :
12+ name_template : ' checksums.txt'
13+ snapshot :
14+ name_template : " {{ incpatch .Version }}-next"
15+ changelog :
16+ sort : asc
17+ filters :
18+ exclude :
19+ - ' ^docs:'
20+ - ' ^test:'
You can’t perform that action at this time.
0 commit comments