-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (54 loc) · 1.67 KB
/
build-release.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
name: Build and Push Multi-Arch Images
on:
push:
branches:
- main
tags:
- "v*.*.*"
jobs:
get-tag:
runs-on: ubuntu-latest
name: Get tag
outputs:
tag: ${{ steps.parse-tag.outputs.tag }}
steps:
- uses: actions/checkout@v3
- uses: aica-technology/.github/.github/actions/[email protected]
id: parse-tag
build:
needs: [get-tag]
strategy:
matrix:
arch: [amd64, arm64]
include:
- image: ubuntu-latest
- image: buildjet-2vcpu-ubuntu-2204-arm
arch: arm64
runs-on: ${{ matrix.image }}
name: Build and publish (${{ matrix.arch }})
steps:
- uses: actions/checkout@v3
- uses: aica-technology/.github/.github/actions/[email protected]
id: merge-tags
with:
list: ${{ needs.get-tag.outputs.tag }}
suffixes: ${{ matrix.arch }}
glue_separator: "-"
- uses: aica-technology/.github/.github/actions/[email protected]
with:
image_name: aica-technology/network-interfaces
image_tags: ${{ steps.merge-tags.outputs.list }}
build_flags: --build-arg VERSION=${{ needs.get-tag.outputs.tag }}
dockerfile_path: Dockerfile
token: ${{ secrets.GITHUB_TOKEN }}
multi-arch:
runs-on: ubuntu-latest
name: Merge into a multi-arch image
needs: [get-tag, build]
steps:
- uses: aica-technology/.github/.github/actions/[email protected]
with:
image_name: aica-technology/network-interfaces
image_tags: ${{ needs.get-tag.outputs.tag }}
archs: amd64,arm64
token: ${{ secrets.GITHUB_TOKEN }}