Skip to content

Update docker/setup-qemu-action action to v3 #23

Update docker/setup-qemu-action action to v3

Update docker/setup-qemu-action action to v3 #23

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