build #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: [workflow_dispatch] | |
env: | |
PACKER_CONFIG_DIR: | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup `packer` | |
uses: hashicorp/setup-packer@main | |
id: setup | |
- name: Setup arm packer prerequisites | |
run: | | |
sudo add-apt-repository ppa:longsleep/golang-backports | |
sudo apt-get update | |
sudo apt-get install golang-go | |
sudo apt-get install qemu-user-static go | |
- name: Build packer-builder-arm | |
run: | | |
git clone https://github.com/mkaczanowski/packer-builder-arm | |
cd packer-builder-arm | |
go mod download | |
go build | |
- name: Build example image | |
run: | | |
packer build boards/raspberry-pi-4/ubuntu_server_20.04_arm64.pkr.hcl | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ubuntu-20.04.img |