-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 1.26 KB
/
product-service.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Product Service CI
on:
push:
paths:
- 'src/go/store_product-service/**'
- 'src/go/common/**'
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2-beta
- uses: Arduino/actions/setup-protoc@master
- name: Install Protoc-gen-go
run: go get -u github.com/golang/protobuf/protoc-gen-go
- name: Mount bazel cache
uses: actions/cache@v1
with:
path: "/home/runner/.cache/bazel"
key: bazel
- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.3.0/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
- name: Install deps
run: make go--deps
- name: Build proto
run: make go--genproto
- name: Build docker image
env:
DOCKER_PASS: ${{ secrets.HUB_PASSWORD }}
run: |
echo 'Logging in to Docker Hub'
docker login -u theleede -p $DOCKER_PASS
echo 'Building Image and pushing it'
make product-service--docker-build
make product-service--docker-push