-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (30 loc) · 969 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
name: build
on: [workflow_dispatch, push]
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: src
- name: Cache packer
uses: actions/cache@v4
id: cache-valgrind
with:
path: ".packer_cache/"
key: ${{ runner.os }}-${{ hashFiles('src/install/packer_test.json') }}
- name: Build
run: docker run --rm --privileged -v /dev:/dev -v ${PWD}:/build mkaczanowski/packer-builder-arm build src/install/packer_test.json
- name: Install PiShrink
run: |
wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh
chmod +x pishrink.sh
sudo mv pishrink.sh /usr/local/bin
- name: Shrink img
run: sudo pishrink.sh -a -Z -v test.img
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: img
path: test.img.xz