mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-01 00:18:10 +02:00
revert changes in lean image action
This commit is contained in:
parent
7680394f15
commit
1dda73f75c
86
.github/workflows/arm64-rpi-lean-image.yml
vendored
86
.github/workflows/arm64-rpi-lean-image.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: arm64-rpi-image-build
|
||||
name: arm64-rpi-lean-image-build
|
||||
|
||||
concurrency:
|
||||
group: arm64-rpi-lean-image-build-${{ github.head_ref }}
|
||||
@ -28,7 +28,7 @@ on:
|
||||
- 'ci/arm64-rpi/**'
|
||||
|
||||
jobs:
|
||||
arm64-rpi-lean-image-build:
|
||||
arm64-rpi-image-build:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -57,75 +57,27 @@ jobs:
|
||||
echo "Using the variables: --pack lean --github_user ${{steps.set_values.outputs.GITHUB_USER}} --branch ${{env.BRANCH_NAME}}"
|
||||
cd ci/arm64-rpi
|
||||
bash packer.build.arm64-rpi.sh --pack lean --github_user ${{steps.set_values.outputs.GITHUB_USER}} --branch ${{env.BRANCH_NAME}}
|
||||
- name: Calculate checksum
|
||||
|
||||
- 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: Upload the image
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: raspiblitz-arm64-rpi-lean
|
||||
path: |
|
||||
ci/arm64-rpi/raspiblitz-arm64-rpi-lean.img
|
||||
ci/arm64-rpi/raspiblitz-arm64-rpi-lean.img.sha256
|
||||
arm64-rpi-fat-image-build:
|
||||
needs: arm64-rpi-lean-image-build
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@master
|
||||
with:
|
||||
root-reserve-mb: 31000
|
||||
temp-reserve-mb: 31000
|
||||
remove-dotnet: 'true'
|
||||
remove-android: 'true'
|
||||
remove-haskell: 'true'
|
||||
remove-codeql: 'true'
|
||||
remove-docker-images: 'true'
|
||||
- name: Display free space
|
||||
|
||||
- name: Compress image
|
||||
run: |
|
||||
df -h
|
||||
du -hd1
|
||||
- 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 [ -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
|
||||
if [[ "${{github.event_name}}" == "pull_request" ]]; then
|
||||
echo "GITHUB_USER=${{github.event.pull_request.head.repo.owner.login}}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "GITHUB_USER=$(echo ${{github.repository}} | cut -d'/' -f1)" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Download lean image
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: raspiblitz-arm64-rpi-lean
|
||||
path: ci/arm64-rpi
|
||||
- name: set "image_checksum" variable
|
||||
run: |
|
||||
echo "IMAGE_CHECKSUM=$(cat ci/arm64-rpi/raspiblitz-arm64-rpi-lean.img.sha256 | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
- name: Run the fatpack build
|
||||
run: |
|
||||
echo "Using the variables: --github_user ${{steps.set_values.outputs.GITHUB_USER}} --branch ${{env.BRANCH_NAME}}"
|
||||
cd ci/arm64-rpi
|
||||
docker run --rm --privileged \
|
||||
-v /dev:/dev \
|
||||
-v .:/build \
|
||||
mkaczanowski/packer-builder-arm:1.0.9 build \
|
||||
-var "github_user=${{steps.set_values.outputs.GITHUB_USER}}" \
|
||||
-var "branch=${{env.BRANCH_NAME}}" \
|
||||
-var "artifact=file:/build/raspiblitz-arm64-rpi-lean.img" \
|
||||
-var "image_checksum=${{env.IMAGE_CHECKSUM}}" \
|
||||
build.arm64-rpi-fat.pkr.hcl
|
||||
- name: Upload fatpack
|
||||
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@v4
|
||||
with:
|
||||
name: raspiblitz-fat
|
||||
path: ci/arm64-rpi/raspiblitz-arm64-rpi-fat.img
|
||||
name: raspiblitz-arm64-rpi-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
|
||||
|
Loading…
x
Reference in New Issue
Block a user