File tree Expand file tree Collapse file tree 3 files changed +98
-0
lines changed
Expand file tree Collapse file tree 3 files changed +98
-0
lines changed Original file line number Diff line number Diff line change 1+ version : 2
2+ updates :
3+ - package-ecosystem : docker
4+ directory : /
5+ schedule :
6+ interval : daily
7+
8+ - package-ecosystem : gomod
9+ directory : /
10+ schedule :
11+ interval : daily
12+
13+ - package-ecosystem : github-actions
14+ directory : /
15+ schedule :
16+ interval : daily
17+
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ env :
8+ REGISTRY : ghcr.io
9+ IMAGE_NAME : ${{ github.repository }}
10+
11+ jobs :
12+ build-and-push :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ packages : write
17+
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v4
21+
22+ - name : Log in to GitHub Container Registry
23+ uses : docker/login-action@v3
24+ with :
25+ registry : ${{ env.REGISTRY }}
26+ username : ${{ github.actor }}
27+ password : ${{ secrets.GITHUB_TOKEN }}
28+
29+ - name : Extract Docker metadata
30+ id : meta
31+ uses : docker/metadata-action@v5
32+ with :
33+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
34+ tags : |
35+ type=semver,pattern={{version}}
36+ type=semver,pattern={{major}}.{{minor}}
37+ type=semver,pattern={{major}}
38+ type=sha
39+
40+ - name : Build and push Docker image
41+ uses : docker/build-push-action@v6
42+ with :
43+ context : .
44+ push : true
45+ tags : ${{ steps.meta.outputs.tags }}
46+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on :
4+ push :
5+ branches-ignore :
6+ - main
7+ workflow_call :
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v6.0.2
15+
16+ - name : Setup Go
17+ uses : actions/setup-go@v6.3.0
18+ with :
19+ go-version : " 1.26.x"
20+
21+ - name : Install Dependencies
22+ run : go get ./...
23+
24+ - name : Build
25+ run : go build ./...
26+
27+ - name : Run tests
28+ run : go test ./... -json > TestResults.json
29+
30+ - name : Upload test results
31+ uses : actions/upload-artifact@v7.0.0
32+ if : ${{ always() }}
33+ with :
34+ name : Go-results
35+ path : TestResults.json
You can’t perform that action at this time.
0 commit comments