Skip to content

fixup! Add support for ARM64 #63

fixup! Add support for ARM64

fixup! Add support for ARM64 #63

Workflow file for this run

name: Build VM Disk Image
env:
PACKER_VERSION: '1.8.4'
on:
push:
branches: '*'
tags: 'v*'
pull_request:
branches:
- master
jobs:
build:
name: ${{ matrix.version }}, ${{ matrix.architecture.name }}
runs-on: ubuntu-latest
strategy:
matrix:
version:
# - 9.2
# - 9.3
- 10.0_RC1
architecture:
# - name: x86-64
# qemu: x86_64
- name: arm64
qemu: aarch64
# exclude:
# - version: 9.2
# architecture:
# name: arm64
# qemu: aarch64
#
# - version: 9.3
# architecture:
# name: arm64
# qemu: aarch64
steps:
- name: Clone Repository
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install Dependencies
run: | # need to have QEMU 8.2 or later
apt update && apt install -y qemu-utils
curl -L --retry 3 -o qemu.tar 'https://github.com/cross-platform-actions/resources/releases/download/v0.10.0/qemu-system-${{ matrix.architecture.qemu }}-linux.tar'
tar xf qemu.tar
if [ -f share/qemu/uefi.fd ]; then
mv share/qemu/uefi.fd share/qemu/edk2-aarch64-code.fd
fi
- uses: hashicorp/setup-packer@main
with:
version: ${{ env.PACKER_VERSION }}
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Build Image
run: |
PACKER_LOG=1 ./build.sh \
'${{ matrix.version }}' \
'${{ matrix.architecture.name }}' \
-var 'headless=true' \
-var qemu_binary=./bin/qemu
- name: Extract Version
id: version
if: startsWith(github.ref, 'refs/tags/v')
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
- name: Create Release
id: create_release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
name: NetBSD ${{ steps.version.outputs.VERSION }}
draft: true
files: output/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}