File tree 3 files changed +30
-8
lines changed
3 files changed +30
-8
lines changed Original file line number Diff line number Diff line change 6
6
runs-on : ubuntu-latest
7
7
steps :
8
8
- uses : actions/checkout@master
9
- - name : build + push
9
+ - name : build
10
10
run : |
11
- version=$(date "+%Y-%m-%d")-$(git --no-pager log -1 --pretty=%h)
12
- gpr_image_prefix=docker.pkg.github.com/nais/device/apiserver
13
- docker build -t ${gpr_image_prefix}:latest -t ${gpr_image_prefix}:${version} .
14
- echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com --username x-access-token --password-stdin
15
- docker push ${gpr_image_prefix}:latest
16
- docker push ${gpr_image_prefix}:${version}
17
-
11
+ make linux
12
+ - name : set version
13
+ id : set_version
14
+ run : |
15
+ echo ::set-output name=version::$(date "+%Y-%m-%d")-$(git --no-pager log -1 --pretty=%h)
16
+ - name : create release
17
+ id : create_release
18
+
19
+ env :
20
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
21
+ with :
22
+ tag_name : ${{ steps.set_version.outputs.version }}
23
+ release_name : Release ${{ steps.set_version.outputs.version }}
24
+ draft : false
25
+ prerelease : true
26
+ - name : upload binary
27
+ id : upload-release
28
+
29
+ env :
30
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31
+ with :
32
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
33
+ asset_path : ./bin/apiserver
34
+ asset_name : apiserver-${{ steps.set_version.outputs.version }}
35
+ asset_content_type : application/octet-stream
Original file line number Diff line number Diff line change 1
1
.idea /
2
+ bin
Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ all: test alpine
5
5
alpine :
6
6
go build -a -installsuffix cgo -o bin/apiserver cmd/apiserver/main.go
7
7
8
+ linux :
9
+ GOOS=linux GOARCH=amd64 go build -o bin/apiserver cmd/apiserver/main.go
10
+
8
11
local-apiserver :
9
12
go run ./cmd/apiserver/main.go --db-connection-uri=${DB_CONNECTION_URI} || echo " forget to export DB_CONNECTION_URL=<DSN> ?"
10
13
You can’t perform that action at this time.
0 commit comments