-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (34 loc) · 998 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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