-
Notifications
You must be signed in to change notification settings - Fork 474
75 lines (67 loc) · 2.24 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
74
name: build
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
build:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Go
uses: actions/setup-go@master
with:
go-version: 1.22.x
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get Repo Owner
id: get_repo_owner
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV
- name: Get git commit
id: get_git_commit
run: echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Build x86_64 container into library
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
outputs: "type=docker,push=false"
platforms: linux/amd64
build-args: |
GIT_COMMIT=dev-${{env.GIT_COMMIT}}
VERSION=dev-${{env.GIT_COMMIT}}
tags: |
ghcr.io/${{ env.REPO_OWNER }}/faas-netes:${{ github.sha }}
- name: Build multi-arch containers for validation only
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
outputs: "type=image,push=false"
platforms: linux/amd64,linux/arm/v7,linux/arm64
build-args: |
GIT_COMMIT=dev-${{env.GIT_COMMIT}}
VERSION=dev-${{env.GIT_COMMIT}}
tags: |
ghcr.io/${{ env.REPO_OWNER }}/faas-netes:${{ github.sha }}
# Todo - load the image into Kind before running tests
# otherwise, this just tests the chart with images that
# have already been built and pushed in an earlier job
- name: get tools
run: ./contrib/get_tools.sh
- name: lint chart
run: ./contrib/lint_chart.sh
- name: create cluster
run: ./contrib/create_cluster.sh
- name: deploy function
run: OPERATOR=0 ./contrib/deploy.sh
- name: run function
run: OPERATOR=0 ./contrib/run_function.sh
- name: stop dev cluster
run: ./contrib/stop_dev.sh