Skip to content

prevent sleep and "unable to resolve host debian" error (#151) #182

prevent sleep and "unable to resolve host debian" error (#151)

prevent sleep and "unable to resolve host debian" error (#151) #182

name: amd64-image-build
on:
push:
branches: [ "master" ]
paths-ignore:
- '*.md'
- '.gitignore'
- 'images'
- 'ci/arm64-rpi/**'
- 'scripts/jam-remote'
pull_request:
branches: [ "master" ]
paths-ignore:
- '*.md'
- '.gitignore'
- 'images'
- 'ci/arm64-rpi/**'
- 'scripts/jam-remote'
workflow_dispatch:
jobs:
amd64-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-amd64-debian-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }}"
- name: Run the build script
run: |
echo "Running with: ${{steps.set_values.outputs.github_user}} $GITHUB_HEAD_REF"
cd ci/amd64
bash packer.build.amd64-debian.sh ${{steps.set_values.outputs.github_user}} $GITHUB_HEAD_REF
- name: Compute checksum of the raw image
run: |
cd ci/amd64/builds/joininbox-amd64-debian-qemu/
sha256sum joininbox-amd64-debian.qcow2 > joininbox-amd64-debian.qcow2.sha256
- name: Compress image
run: |
cd ci/amd64/builds/joininbox-amd64-debian-qemu/
gzip -v9 joininbox-amd64-debian.qcow2
- name: Compute checksum of the compressed image
run: |
cd ci/amd64/builds/joininbox-amd64-debian-qemu/
sha256sum joininbox-amd64-debian.qcow2.gz > joininbox-amd64-debian.qcow2.gz.sha256
- name: Upload the image and checksums
uses: actions/upload-artifact@v3
with:
name: joininbox-amd64-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }}
path: |
${{ github.workspace }}/ci/amd64/builds/joininbox-amd64-debian-qemu/joininbox-amd64-debian.qcow2.sha256
${{ github.workspace }}/ci/amd64/builds/joininbox-amd64-debian-qemu/joininbox-amd64-debian.qcow2.gz
${{ github.workspace }}/ci/amd64/builds/joininbox-amd64-debian-qemu/joininbox-amd64-debian.qcow2.gz.sha256