This repository was archived by the owner on Oct 20, 2023. It is now read-only.
File tree 2 files changed +15
-20
lines changed 2 files changed +15
-20
lines changed Original file line number Diff line number Diff line change 3
3
pull_request : {}
4
4
push :
5
5
tags :
6
- - ' v*.*.*'
6
+ - ' v*.*.*'
7
7
paths-ignore :
8
8
- ' *.md'
9
9
- ' **/*.md'
10
- branches :
11
- - master
10
+
12
11
jobs :
13
12
go_build_test :
14
13
name : Go Build and Test
@@ -37,18 +36,22 @@ jobs:
37
36
run : |
38
37
make build
39
38
release :
40
- name : Docker Push and Release
39
+ name : Docker Push and Github Release
41
40
needs : docker_build
42
41
runs-on : ubuntu-latest
43
- if : github.event_name == 'push' && startsWith(github.ref, 'v')
44
42
steps :
45
- - name : Set env
46
- run : echo ::set-env name=RELEASE_VERSION::${GITHUB_REF/refs\/tags\//}
43
+ - name : Checkout code
44
+ uses : actions/checkout@master
45
+ - name : Setup Go
46
+ uses : actions/setup-go@v1
47
+ with :
48
+ go-version : 1.13.8
47
49
- name : Docker Build and Push
50
+ if : github.event_name == 'push'
48
51
run : |
52
+ export RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}
53
+ export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
54
+ export PATH=${PATH}:`go env GOPATH`/bin
49
55
docker login -u ${{ secrets.DOCKER_USER}} -p ${{ secrets.DOCKER_PASS}} && \
50
56
make push
51
- - name : Performing a Github release
52
- run : |
53
- export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
54
57
make release
Original file line number Diff line number Diff line change 1
1
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST ) ) ) )
2
2
3
3
HAS_TILT := $(shell command -v tilt;)
4
- HAS_GOX := $(shell command -v gox;)
5
4
HAS_GHR := $(shell command -v ghr;)
6
- HAS_HELM := $(shell command -v helm;)
7
5
8
6
9
7
IMAGE_NAME ?= deislabs/smi-metrics
@@ -18,19 +16,13 @@ endif
18
16
19
17
.PHONY : release-bootstrap
20
18
release-bootstrap :
21
- @# Check for gox
22
- ifndef HAS_GOX
23
- @echo "Installing gox"
24
- go get -u github.com/mitchellh/gox
25
- endif
19
+ @echo " Installing Helm v2"
20
+ set -x; curl -L https://git.io/get_helm.sh | bash
26
21
@# Check for ghr
27
22
ifndef HAS_GHR
28
23
@echo "Installing ghr"
29
24
go get -u github.com/tcnksm/ghr
30
25
endif
31
- ifndef HAS_HELM
32
- set -x; curl -L https://git.io/get_helm.sh | bash
33
- endif
34
26
35
27
.PHONY : bootstrap
36
28
bootstrap :
You can’t perform that action at this time.
0 commit comments