File tree Expand file tree Collapse file tree 5 files changed +71
-116
lines changed
Expand file tree Collapse file tree 5 files changed +71
-116
lines changed Original file line number Diff line number Diff line change 1+ name : Docker Build Action
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - master
7+ push :
8+ branches :
9+ - master
10+ release :
11+ types :
12+ - published
13+
14+ env :
15+ REGISTRY : ghcr.io
16+ IMAGE_NAME : ${{ github.repository }}
17+
18+ jobs :
19+ build :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout
23+ uses : actions/checkout@v4
24+
25+ - name : Docker Login
26+ uses : docker/login-action@v3
27+ with :
28+ registry : ${{ secrets.DOCKER_REGISTRY }}
29+ username : ${{ secrets.DOCKER_REGISTRY_USER }}
30+ password : ${{ secrets.DOCKER_REGISTRY_TOKEN }}
31+ if : ${{ github.event_name != 'pull_request' }}
32+
33+ - name : Set up Go 1.24
34+ uses : actions/setup-go@v5
35+ with :
36+ go-version : ' 1.24.x'
37+
38+ - name : Lint
39+ uses : golangci/golangci-lint-action@v7
40+
41+ - name : Make tag
42+ run : |
43+ [ "${GITHUB_EVENT_NAME}" == 'pull_request' ] && echo "tag=pr-${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV || true
44+ [ "${GITHUB_EVENT_NAME}" == 'release' ] && echo "tag=${GITHUB_REF##*/}" >> $GITHUB_ENV || true
45+ [ "${GITHUB_EVENT_NAME}" == 'push' ] && echo "tag=latest" >> $GITHUB_ENV || true
46+
47+ - name : Set up Docker Buildx
48+ uses : docker/setup-buildx-action@v3
49+
50+ - name : Build and push image
51+ uses : docker/build-push-action@v6
52+ with :
53+ context : .
54+ push : ${{ github.event_name != 'pull_request' }}
55+ sbom : true
56+ tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.tag }}
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ ---
2+ name : Release Drafter Action
3+
4+ on :
5+ push :
6+ branches :
7+ - master
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : release-drafter/release-drafter@v6
14+ env :
15+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments