-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (63 loc) · 1.88 KB
/
Copy pathbuild.yaml
File metadata and controls
65 lines (63 loc) · 1.88 KB
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
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/forge4flow/forge-cli
load: true
tags: forge4flow/forge-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/forge4flow/forge-cli
tags: forge4flow/forge-cli:${{ github.sha }}
- name: Copy binary to host
run: |
docker create --name forge-cli forge4flow/forge-cli:${{ github.sha }} && \
mkdir -p ./bin && \
docker cp forge-cli:/usr/bin/forge-cli ./bin && \
docker rm -f forge-cli
- name: Build samples
run: ./build_samples.sh
- name: Test version
run: ./test/version.sh ./bin/forge-cli
# TODO: Fix testing
# - name: Test the cli and the function behaviour
# run: make test-templating