build: update to Debian 12.2.0, create home folders as 0755 (#139) #196
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: arm64-rpi-image-build | |
on: | |
push: | |
branches: [ "master" ] | |
paths-ignore: | |
- '*.md' | |
- '.gitignore' | |
- 'images' | |
- 'ci/amd64/**' | |
- 'scripts/jam-remote' | |
- 'Makefile' | |
pull_request: | |
branches: [ "master" ] | |
paths-ignore: | |
- '*.md' | |
- '.gitignore' | |
- 'images' | |
- 'ci/amd64/**' | |
- 'scripts/jam-remote' | |
- 'Makefile' | |
workflow_dispatch: | |
jobs: | |
arm64-rpi-image-build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set values | |
id: set_values | |
run: | | |
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV | |
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV | |
if [[ "${{github.event_name}}" == "pull_request" ]]; then | |
echo "::set-output name=github_user::${{github.event.pull_request.head.repo.owner.login}}" | |
else | |
echo "::set-output name=github_user::$(echo ${{github.repository}} | cut -d'/' -f1)" | |
fi | |
- name: Display the build name | |
run: echo "Building the joininbox-arm64-rpi-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }}" | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
- name: Run the build script | |
run: | | |
echo "Running with: ${{steps.set_values.outputs.github_user}} $GITHUB_HEAD_REF" | |
cd ci/arm64-rpi | |
bash arm64-rpi.sh ${{steps.set_values.outputs.github_user}} $GITHUB_HEAD_REF | |
- name: Compute checksum of the raw image | |
run: | | |
cd ci/arm64-rpi | |
sha256sum joininbox-arm64-rpi.img > joininbox-arm64-rpi.img.sha256 | |
- name: Compress image | |
run: | | |
cd ci/arm64-rpi | |
gzip -v9 joininbox-arm64-rpi.img | |
- name: Compute checksum of the compressed image | |
run: | | |
cd ci/arm64-rpi | |
sha256sum joininbox-arm64-rpi.img.gz > joininbox-arm64-rpi.img.gz.sha256 | |
- name: Upload the image and checksums | |
uses: actions/upload-artifact@v3 | |
with: | |
name: joininbox-arm64-rpi-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }} | |
path: | | |
${{ github.workspace }}/ci/arm64-rpi/joininbox-arm64-rpi.img.sha256 | |
${{ github.workspace }}/ci/arm64-rpi/joininbox-arm64-rpi.img.gz | |
${{ github.workspace }}/ci/arm64-rpi/joininbox-arm64-rpi.img.gz.sha256 |