-
Notifications
You must be signed in to change notification settings - Fork 18
51 lines (45 loc) · 1.18 KB
/
ci-on-pr.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
name: CI on Push and Pull Request
on:
pull_request:
branches:
- master
push:
branches:
- master
env:
IMAGE: rancher/hyperkube-base
jobs:
test-prepare-binaries:
permissions:
contents: read
strategy:
matrix:
os: [linux]
arch: [ amd64, arm64 ]
runs-on: org-${{ github.repository_owner_id }}-${{ matrix.arch }}-k8s
container: ubuntu:22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare binaries
run: |
apt-get update
apt-get install -y make
make ARCH=${{ matrix.arch }} scripts/iptables-wrapper-installer.sh
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
flavor: |
latest=false
- name: Test build Docker image
uses: docker/build-push-action@v5
with:
context: .
push: false
tags: "${{ steps.meta.outputs.tags }}"
platforms: "${{ matrix.os }}/${{ matrix.arch }}"
labels: "${{ steps.meta.outputs.labels }}"
build-args: |
ARCH="${{ matrix.arch }}"