CI #50
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, 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 |