-
Notifications
You must be signed in to change notification settings - Fork 223
73 lines (71 loc) · 1.9 KB
/
build.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: build
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
steps:
-
uses: actions/checkout@master
with:
fetch-depth: 1
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Local docker build (non-root image)
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: false
platforms: linux/amd64
target: release
build-args: |
VERSION=latest-dev
GIT_COMMIT=${{ github.sha }}
REPO_URL=https://github.com/openfaas/faas-cli
load: true
tags: openfaas/faas-cli:${{ github.sha }}
-
name: Test for multi-arch build
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: false
load: false
platforms: linux/amd64,linux/arm/v7,linux/arm64
target: release
build-args: |
VERSION=latest-dev
GIT_COMMIT=${{ github.sha }}
REPO_URL=https://github.com/openfaas/faas-cli
tags: openfaas/faas-cli:${{ github.sha }}
-
name: Copy binary to host
run: |
docker create --name faas-cli openfaas/faas-cli:${{ github.sha }} && \
mkdir -p ./bin && \
docker cp faas-cli:/usr/bin/faas-cli ./bin && \
docker rm -f faas-cli
-
name: Build samples
run: ./build_samples.sh
-
name: Test version
run: ./test/version.sh ./bin/faas-cli
-
name: Test the cli and the function behaviour
run: make test-templating