Skip to content

Use ubuntu:latest for the container #7

Use ubuntu:latest for the container

Use ubuntu:latest for the container #7

Workflow file for this run

name: Build VM Disk Image
on:
push:
branches: '*'
tags: 'v*'
pull_request:
branches:
- master
permissions:
contents: write
jobs:
build:
name: ${{ matrix.version }} ${{ matrix.architecture.name }}
runs-on: ubuntu-latest
container: ubuntu:latest
strategy:
fail-fast: false
matrix:
version:
- '13.2'
architecture:
- name: x86-64
qemu: x86
steps:
- name: Clone Repository
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install Dependencies
run: |
apt update && \
apt install curl jq unzip \
"qemu-system-${{ matrix.architecture.qemu }}" -y
- uses: hashicorp/setup-packer@main
with:
version: "1.9.1"
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true
- name: Install UEFI
if: matrix.architecture.name == 'arm64'
run: cp "$(cat /usr/share/qemu/firmware/60-edk2-aarch64.json | jq .mapping.executable.filename -r)" edk2-aarch64-code.fd
- name: Build Image
env:
PACKER_LOG: 1
run: |
./build.sh '${{ matrix.version }}' '${{ matrix.architecture.name }}' \
-var 'headless=true'
- 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: FreeBSD ${{ steps.version.outputs.VERSION }}
draft: true
files: output/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}