-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (62 loc) · 1.64 KB
/
build-kubeadm.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
name: Build images on macOS
on:
push:
branches: [main]
pull_request:
jobs:
docker:
strategy:
matrix:
os: [ubuntu-kubeadm-22.04]
kubernetes: [1.27.0-00, 1.26.3-00, 1.25.8-00]
runs-on: macos-latest
permissions:
packages: write
contents: read
steps:
-
name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install zx
run: |
npm i -g zx
- name: Use latest Packer
uses: hashicorp-contrib/setup-packer@v2
- name: Set up QEMU
run: |
brew install qemu
- name: Install docker
run: |
brew install docker
colima start
-
name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/kubevirt-${{ matrix.os }}-${{ matrix.kubernetes }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
- name: Build
env:
FORCE_COLOR: 3
TAGS: ${{ steps.meta.outputs.tags }}
IS_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
K8S_VERSION: ${{ matrix.kubernetes }}
run: |
npx zx ${{ matrix.os }}.js