2023-07-08 12:58:00 +00:00
|
|
|
name: arm64-rpi-debian12-lean-image-build
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: arm64-rpi-debian12-lean-image-build-${{ github.head_ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches: ["dev"]
|
|
|
|
paths:
|
|
|
|
- "build_sdcard.sh"
|
|
|
|
- "home.admin/bitcoin.install.sh"
|
|
|
|
- "home.admin/tor.install.sh"
|
|
|
|
- "home.admin/blitz.i2pd.sh"
|
|
|
|
- "home.admin/blitz.web.sh"
|
|
|
|
- "home.admin/blitz.display.sh"
|
|
|
|
- "ci/arm64-rpi/**"
|
|
|
|
pull_request:
|
|
|
|
branches: ["dev"]
|
|
|
|
paths:
|
|
|
|
- "build_sdcard.sh"
|
|
|
|
- "home.admin/bitcoin.install.sh"
|
|
|
|
- "home.admin/tor.install.sh"
|
|
|
|
- "home.admin/blitz.i2pd.sh"
|
|
|
|
- "home.admin/blitz.web.sh"
|
|
|
|
- "home.admin/blitz.display.sh"
|
|
|
|
- "ci/arm64-rpi/**"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
arm64-rpi-image-build:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Set values
|
|
|
|
run: |
|
|
|
|
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
|
|
|
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
2023-07-31 22:34:52 +02:00
|
|
|
if [ -z "$GITHUB_HEAD_REF" ]; then
|
|
|
|
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
|
|
|
|
else
|
|
|
|
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
|
|
|
fi
|
2023-07-08 12:58:00 +00:00
|
|
|
|
|
|
|
- name: Hello Raspiblitz
|
|
|
|
run: echo "Building the raspiblitz-arm64-rpi-lean-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }}"
|
|
|
|
|
|
|
|
- name: Run the build script
|
|
|
|
run: |
|
2023-07-31 22:34:52 +02:00
|
|
|
echo "Using the variables: --pack lean --github_user $GITHUB_ACTOR --branch ${{env.BRANCH_NAME}} --image_link https://raspi.debian.net/tested/20230612_raspi_4_bookworm.img.xz --image_checksum a68cd2bfe7831c438d8a5d832803ae0db17afec9f3cd370d9e8748c7b5456283"
|
2023-07-08 12:58:00 +00:00
|
|
|
cd ci/arm64-rpi
|
2023-07-31 22:34:52 +02:00
|
|
|
bash packer.build.arm64-rpi.sh --pack lean --github_user $GITHUB_ACTOR --branch ${{env.BRANCH_NAME}} --image_link https://raspi.debian.net/tested/20230612_raspi_4_bookworm.img.xz --image_checksum a68cd2bfe7831c438d8a5d832803ae0db17afec9f3cd370d9e8748c7b5456283
|
2023-07-08 12:58:00 +00:00
|
|
|
|
|
|
|
- name: Compute checksum of the raw image
|
|
|
|
run: |
|
|
|
|
cd ci/arm64-rpi
|
|
|
|
sha256sum raspiblitz-arm64-rpi-lean.img > raspiblitz-arm64-rpi-lean.img.sha256
|
|
|
|
|
|
|
|
- name: Compress image
|
|
|
|
run: |
|
|
|
|
cd ci/arm64-rpi
|
|
|
|
gzip -v9 raspiblitz-arm64-rpi-lean.img
|
|
|
|
|
|
|
|
- name: Compute checksum of the compressed image
|
|
|
|
run: |
|
|
|
|
cd ci/arm64-rpi
|
|
|
|
sha256sum raspiblitz-arm64-rpi-lean.img.gz > raspiblitz-arm64-rpi-lean.img.gz.sha256
|
|
|
|
|
|
|
|
- name: Upload the image and checksums
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: raspiblitz-arm64-rpi--debian12-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }}
|
|
|
|
path: |
|
|
|
|
${{ github.workspace }}/ci/arm64-rpi/raspiblitz-arm64-rpi-lean.img.sha256
|
|
|
|
${{ github.workspace }}/ci/arm64-rpi/raspiblitz-arm64-rpi-lean.img.gz
|
|
|
|
${{ github.workspace }}/ci/arm64-rpi/raspiblitz-arm64-rpi-lean.img.gz.sha256
|