-
Notifications
You must be signed in to change notification settings - Fork 11
37 lines (33 loc) · 1.07 KB
/
ci.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
name: Build, test, and lint
on:
pull_request:
push:
branches: [main]
release:
types: [published]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
- name: Check out code
uses: actions/checkout@v2
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Build and push main/tag and latest Docker images
uses: docker/[email protected]
if: ${{ github.event_name == 'push' || github.event_name == 'release' }}
with:
repository: cnabio/signy-in-toto-verifier
tags: ${{ env.GITHUB_REF_SLUG }}, latest
dockerfile: in-toto-container.Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build, test, and lint
env:
TAG: 'latest'
run: |
export GOPATH=$HOME/go && export GOBIN=$(go env GOPATH)/bin && export PATH=$PATH:$GOPATH && export PATH=$PATH:$GOBIN && mkdir -p $GOBIN
make TAG=$TAG bootstrap build test lint