Skip to content
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.BENTO_TOKEN }}"
# PACKER_LOG: "1"
jobs:
aarch64:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
# - ubuntu-24.04
provider:
- virtualbox-iso
steps:
- name: Checkout
uses: actions/checkout@main
- name: Install Vagrant Virtualbox
run: |
brew tap hashicorp/tap
brew update
brew install --cask hashicorp/tap/hashicorp-vagrant
brew install --cask virtualbox@beta
- name: Install Chef
uses: actionshub/[email protected]
with:
version: 24.2.1058
- name: Setup Packer
uses: hashicorp/setup-packer@main
with:
version: latest
- name: Install Bento
run: |
eval "$(chef shell-init bash)"
gem build bento.gemspec
gem install bento-*.gem
- name: Bento build
run: |
eval "$(chef shell-init bash)"
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl"
ls -alh builds/
cat builds/${{ matrix.os }}*-aarch64._metadata.json
- name: Upload build artifact
uses: actions/upload-artifact@main
with:
name: "${{ matrix.os }}-virtualbox-aarch64"
path: |
builds/*.box
builds/*.json
retention-days: 10
compression-level: 0 # no compression
- name: Bento Test
run: |
eval "$(chef shell-init bash)"
bento test