Skip to content

Commit

Permalink
chore: update pios image
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Aug 9, 2024
1 parent 441ee62 commit 94c3acc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
28 changes: 20 additions & 8 deletions .github/actions/do-build/action.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
name: 'Build image'
description: 'Build image'
name: "Build image"
description: "Build image"
inputs:
companion-ref:
description: 'Git tag/branch from the companion repository'
description: "Git tag/branch from the companion repository"
required: true
default: ''
default: ""
PACKER_GITHUB_API_TOKEN:
description: ''
description: ""
required: false
default: ''
default: ""
env:
PACKER_CACHE_DIR: /tmp/packer_cache
runs:
using: 'composite'
using: "composite"
steps:
- name: install packer
shell: bash
id: install-packer
run: |
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update && sudo apt-get install -y packer
CACHE_KEY=$(grep iso_checksum companionpi.pkr.hcl)
echo "CACHE_KEY=${CACHE_KEY}" >> "$GITHUB_OUTPUT"
- name: Restore image cache
uses: actions/cache@v4
with:
path: /tmp/packer_cache
key: ${{ steps.install-packet.CACHE_KEY }}

- name: build image
shell: bash
run: |
Expand All @@ -36,5 +48,5 @@ runs:
device="$(sudo losetup --partscan --show --find image)"
sudo zerofree "${device}p2"
sudo losetup --detach "$device"
sudo gzip -n image
4 changes: 2 additions & 2 deletions companionpi.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ variable "pibranch" {
}

source "arm-image" "companionpi" {
iso_checksum = "sha256:58a3ec57402c86332e67789a6b8f149aeeb4e7bb0a16c9388a66ea6e07012e45"
iso_url = "https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz"
iso_checksum = "sha256:43d150e7901583919e4eb1f0fa83fe0363af2d1e9777a5bb707d696d535e2599"
iso_url = "https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-07-04/2024-07-04-raspios-bookworm-arm64-lite.img.xz"
last_partition_extra_size = 2147483648
qemu_binary = "qemu-aarch64-static"
}
Expand Down

0 comments on commit 94c3acc

Please sign in to comment.