File tree Expand file tree Collapse file tree 3 files changed +98
-23
lines changed Expand file tree Collapse file tree 3 files changed +98
-23
lines changed Original file line number Diff line number Diff line change 1+ name : Docker image build
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+
9+ defaults :
10+ run :
11+ shell : bash
12+
13+ env :
14+ DOCKER_REPO : lightninglabs
15+ DOCKER_IMAGE : lndmon
16+
17+ jobs :
18+ main :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - name : Set up QEMU
22+ uses : lightninglabs/gh-actions/setup-qemu-action@39555064b3ae5c6d5c71a8ab304355faeaf3f4d4
23+
24+ - name : Set up Docker Buildx
25+ uses : lightninglabs/gh-actions/setup-buildx-action@39555064b3ae5c6d5c71a8ab304355faeaf3f4d4
26+
27+ - name : Login to DockerHub
28+ uses : lightninglabs/gh-actions/login-action@39555064b3ae5c6d5c71a8ab304355faeaf3f4d4
29+ with :
30+ username : ${{ secrets.DOCKER_USERNAME }}
31+ password : ${{ secrets.DOCKER_API_KEY }}
32+
33+ - name : Set env
34+ run : echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
35+
36+ - name : Build and push
37+ id : docker_build
38+ uses : lightninglabs/gh-actions/build-push-action@39555064b3ae5c6d5c71a8ab304355faeaf3f4d4
39+ with :
40+ push : true
41+ platforms : linux/amd64,linux/arm64
42+ tags : " ${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:${{ env.RELEASE_VERSION }}"
43+ build-args : checkout=${{ env.RELEASE_VERSION }}
44+
45+ - name : Image digest
46+ run : echo ${{ steps.docker_build.outputs.digest }}
Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - " master"
7+ pull_request :
8+ branches :
9+ - " *"
10+
11+ defaults :
12+ run :
13+ shell : bash
14+
15+ env :
16+ # go needs absolute directories, using the $HOME variable doesn't work here.
17+ GOCACHE : /home/runner/work/go/pkg/build
18+ GOPATH : /home/runner/work/go
19+ GO_VERSION : 1.16.8
20+
21+ jobs :
22+ # #######################
23+ # lint and build code
24+ # #######################
25+ lint :
26+ name : lint and build code
27+ runs-on : ubuntu-latest
28+ steps :
29+ - name : git checkout
30+ uses : actions/checkout@v2
31+
32+ - name : go cache
33+ uses : actions/cache@v1
34+ with :
35+ path : /home/runner/work/go
36+ key : lndmon-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
37+ restore-keys : |
38+ lndmon-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
39+ lndmon-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
40+ lndmon-${{ runner.os }}-go-${{ env.GO_VERSION }}-
41+ lndmon-${{ runner.os }}-go-
42+
43+ - name : setup go ${{ env.GO_VERSION }}
44+ uses : actions/setup-go@v2
45+ with :
46+ go-version : ' ${{ env.GO_VERSION }}'
47+
48+ - name : lint
49+ run : make lint
50+
51+ - name : build
52+ run : make build
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments