-
Notifications
You must be signed in to change notification settings - Fork 225
50 lines (40 loc) · 1.22 KB
/
pr.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
49
50
# build the image on PRs
name: PR
on:
pull_request:
paths-ignore:
- 'README.md'
- '.github/workflows/master.yml'
- '.github/workflows/*release.yml'
jobs:
pr-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: nelonoel/[email protected]
- name: Docker Login
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
run: docker login --username "$DOCKERHUB_USERNAME" --password "$DOCKERHUB_TOKEN"
- name: Create Short Commit Sha
id: sha_short
if: success()
run: echo ::set-output name=SHA_SHORT::$(git rev-parse --short HEAD)
- name: Build
if: success()
env:
VERSION: ${{ steps.sha_short.outputs.SHA_SHORT }}
run: make build
- name: Test
if: success()
env:
CONTAINER: docker.io/namely/protoc-all:${{ steps.sha_short.outputs.SHA_SHORT }}
run: make test
- name: Test Gateway
if: success()
env:
CONTAINER: docker.io/namely/gen-grpc-gateway:${{ steps.sha_short.outputs.SHA_SHORT }}
run: make test-gwy