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 : Generate release-artifacts
2+
3+ on :
4+ workflow_call :
5+
6+ jobs :
7+ generate :
8+ name : Generate cross-platform builds
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout the repository
12+ uses : actions/checkout@v2
13+ - name : Generate build files
14+ uses : thatisuday/go-cross-build@v1
15+ with :
16+ platforms : ' linux/amd64, darwin/amd64, windows/amd64'
17+ package : ' '
18+ name : ' pulse-bridge'
19+ compress : ' true'
20+ dest : ' dist'
Original file line number Diff line number Diff line change @@ -3,23 +3,37 @@ name: Build
33on :
44 push :
55 branches : [ "main" ]
6+ tags :
7+ - " v*.*.*"
68 pull_request :
79 branches : [ "main","*" ]
810
911jobs :
1012
11- build :
13+ build-go :
1214 runs-on : ubuntu-latest
1315 steps :
14- - uses : actions/checkout@v4
16+ - uses : actions/checkout@v4
1517
16- - name : Set up Go
17- uses : actions/setup-go@v4
18- with :
19- go-version : ' 1.24'
18+ - name : Set up Go
19+ uses : actions/setup-go@v4
20+ with :
21+ go-version : ' 1.24'
2022
21- - name : Build
22- run : go build -v ./...
23+ - name : Build
24+ run : go build -v ./...
2325
24- - name : Test
25- run : go test -v ./...
26+ - name : Test
27+ run : go test -v ./...
28+
29+ trigger-binaries :
30+ needs : build-go
31+ if : startsWith(github.ref, 'refs/tags/v')
32+ uses : ./.github/workflows/binaries.yml
33+ secrets : inherit
34+
35+ trigger-docker-build :
36+ needs : build-go
37+ if : startsWith(github.ref, 'refs/tags/v')
38+ uses : ./.github/workflows/docker.yml
39+ secrets : inherit
Original file line number Diff line number Diff line change 11name : Build and Push Docker Image to GHCR
22
33on :
4- push :
5- tags :
6- - " v*.*.*"
7- workflow_dispatch :
4+ workflow_call :
85
96jobs :
10- build-go :
11- runs-on : ubuntu-latest
12-
13- steps :
14- - uses : actions/checkout@v4
15-
16- - name : Set up Go
17- uses : actions/setup-go@v4
18- with :
19- go-version : ' 1.24'
20-
21- - name : Build
22- run : go build -v ./...
23-
24- - name : Test
25- run : go test -v ./...
26-
277 build-and-push :
28- needs : build-go
298 runs-on : ubuntu-latest
30- if : ${{ github.ref_type == 'tag' }}
319
3210 permissions :
3311 contents : read
5634 with :
5735 context : .
5836 push : true
59- tags : ghcr.io/${{ github.repository_owner }}/pulsebridge :${{ steps.extract_version.outputs.VERSION }}
37+ tags : ghcr.io/${{ github.repository_owner }}/pulse-bridge :${{ steps.extract_version.outputs.VERSION }}
6038 cache-from : type=gha
6139 cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments