Skip to content

Commit

Permalink
CI: Build Raspberry Pi images with GitHub Action: use GitHub hosted r…
Browse files Browse the repository at this point in the history
…unner, Vagrant VM with Fedora, and arpm64 docker image AlmaLinux#46
  • Loading branch information
yuravk committed Jul 26, 2024
1 parent 0267dc3 commit 5ada743
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/build-rpi-github-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ jobs:
# Appliance Tools results directory
rpi_image_resultdir="/rpi-image"
[ "x${rpi_image_resultdir}" != "x" ] && echo "rpi_image_resultdir=${rpi_image_resultdir}" >> $GITHUB_ENV
# Image file base name
image_name="AlmaLinux-${{ inputs.version_major }}-RaspberryPi-${{ inputs.version_major }}.${version_minor}-${date_stamp}.aarch64"
Expand Down Expand Up @@ -266,13 +265,13 @@ jobs:
- name: Get the image Container to Vagrant, then to runner
run: |
# sudo vagrant ssh fedora -c "sudo docker cp ${{ env.docker_container_id }}:${{ env.rpi_image_resultdir }}/${{ env.image_name }}/${{ env.image_name }}.raw ${{ env.rpi_image_resultdir }}/"
# sudo vagrant ssh fedora -c "sudo docker cp ${{ env.docker_container_id }}:${{ env.rpi_image_resultdir }}/${{ env.image_name }}/${{ env.image_name }}.xml ${{ env.rpi_image_resultdir }}/"
# sudo vagrant ssh fedora -c "sudo docker cp ${{ env.docker_container_id }}:${{ env.rpi_image_resultdir }}/${{ env.image_name }}.log* ${{ env.rpi_image_resultdir }}/"
# sudo vagrant ssh fedora -c "sudo ls -la ${{ env.rpi_image_resultdir }}"
sudo vagrant ssh fedora -c "sudo docker cp ${{ env.docker_container_id }}:${{ env.rpi_image_resultdir }}/${{ env.image_name }}/${{ env.image_name }}.raw ${{ env.rpi_image_resultdir }}/"
sudo vagrant ssh fedora -c "sudo docker cp ${{ env.docker_container_id }}:${{ env.rpi_image_resultdir }}/${{ env.image_name }}/${{ env.image_name }}.xml ${{ env.rpi_image_resultdir }}/"
sudo vagrant ssh fedora -c "sudo docker cp ${{ env.docker_container_id }}:${{ env.rpi_image_resultdir }}/${{ env.image_name }}.log* ${{ env.rpi_image_resultdir }}/"
sudo vagrant ssh fedora -c "sudo ls -la ${{ env.rpi_image_resultdir }}"
# mkdir -p ${{ env.image_name }}
touch ${{ env.image_name }}.raw ${{ env.image_name }}.xml ${{ env.image_name }}.log ${{ env.image_name }}.log2
# touch ${{ env.image_name }}.raw ${{ env.image_name }}.xml ${{ env.image_name }}.log ${{ env.image_name }}.log2
sudo vagrant scp fedora:${{ env.rpi_image_resultdir }}/${{ env.image_name }}.raw .
sudo vagrant scp fedora:${{ env.rpi_image_resultdir }}/${{ env.image_name }}.xml .
Expand All @@ -285,10 +284,6 @@ jobs:
# version_minor=$(cut -d '.' -f 2 <<< "$release")
# [ "x${version_minor}" != "x" ] && echo "version_minor=${version_minor}" >> $GITHUB_ENV

# - name: Prepare other stuff
# run: |


# - name: Generate appliance creator script
# run: |
# cat <<'EOF'>./appliance-creator.sh
Expand Down Expand Up @@ -329,7 +324,6 @@ jobs:
id: compress-image
run: |
# cd ${{ env.image_name }}
# XZ default compression level is 6 (of 0-9)
( [ "${{ inputs.upload_to_s3 }}" = "true" ] && xz -k -9 -e -T0 ${{ env.image_name }}.raw ) || true
Expand Down Expand Up @@ -380,7 +374,7 @@ jobs:
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -qq awscliv2.zip
sudo ./aws/install
sudo ./aws/install --update
# [Debug]
aws --version
Expand Down

0 comments on commit 5ada743

Please sign in to comment.