-
Notifications
You must be signed in to change notification settings - Fork 11
49 lines (40 loc) · 1.06 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/[email protected]
if: ${{ github.ref == 'refs/heads/main' }}
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- uses: buildpacks/github-actions/[email protected]
with:
pack-version: 0.23.0
- name: Build
run: make
- name: Install func
run: make bin/func_stable && make bin/func_snapshot
- name: Test
run: make test
- name: Push Images
if: ${{ steps.release.outputs.release_created }}
env:
USER: ${{ secrets.QUAY_USER }}
PASS: ${{ secrets.QUAY_TOKEN }}
run: docker login -u "$USER" -p "$PASS" quay.io && make publish