-
Notifications
You must be signed in to change notification settings - Fork 2.9k
54 lines (41 loc) · 1.28 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
name: build flannel
on: [push, pull_request]
env:
GO_VERSION: "1.23"
LINUX_ARCHES: "amd64 arm arm64 s390x ppc64le riscv64"
REPOSITORY: flannel/flannel
jobs:
build-images:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: set tag
run: echo "GIT_TAG=$(git describe --tags --always)" >> $GITHUB_ENV
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: go mod vendor
run: go mod vendor
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REPOSITORY }}
flavor: latest=false
tags: |
type=ref, event=branch
- name: Build multi-arch Docker image
uses: docker/build-push-action@v5
with:
context: .
file: images/Dockerfile
push: false
platforms: linux/amd64,linux/arm64,linux/arm,linux/s390x,linux/ppc64le,linux/riscv64
tags: ${{ steps.meta.outputs.tags }}
build-args: TAG=${{ env.GIT_TAG }}
- name: build for windows
run: make dist/flanneld.exe