@@ -21,7 +21,7 @@ permissions:
2121 contents : read
2222
2323jobs :
24- build-ubuntu24-raw :
24+ build-ubuntu24-arm- raw :
2525 runs-on : ubuntu-24.04-arm
2626 steps :
2727 - name : Checkout code
4141 - name : Install system deps
4242 run : |
4343 sudo apt-get update
44- sudo apt-get install -y qemu-system-x86 ovmf tree jq systemd-ukify mmdebstrap systemd-boot
44+ sudo apt-get install -y qemu-system-aarch64 ovmf tree jq systemd-ukify mmdebstrap systemd-boot
4545
4646 - name : Set up Go
4747 uses : actions/setup-go@v5
@@ -50,54 +50,54 @@ jobs:
5050
5151 - name : Prepare build script
5252 run : |
53- if [ ! -f scripts/build_ubuntu24_raw .sh ]; then
54- echo "scripts/build_ubuntu24_raw .sh not found!"
53+ if [ ! -f scripts/build_ubuntu24_arm_raw .sh ]; then
54+ echo "scripts/build_ubuntu24_arm_raw .sh not found!"
5555 exit 1
5656 fi
57- chmod +x scripts/build_ubuntu24_raw .sh
57+ chmod +x scripts/build_ubuntu24_arm_raw .sh
5858
59- # - name: Run Ubuntu24 Raw Image Build
60- # env:
61- # RUN_QEMU_TEST: ${{ github.event.inputs.run_qemu_test }}
62- # run: |
63- # echo "Starting Ubuntu24 raw image build..."
64- # # Ensure script has access to docker group for Earthly
65- # sudo usermod -aG docker $USER
66- #
67- # # Prepare arguments with input validation
68- # ARGS=""
69- # case "${RUN_QEMU_TEST}" in
70- # "true")
71- # ARGS="--qemu-test"
72- # echo "QEMU boot test will be run after build"
73- # ;;
74- # "false"|"")
75- # echo "QEMU boot test will be skipped"
76- # ;;
77- # *)
78- # echo "Invalid input for run_qemu_test: ${RUN_QEMU_TEST}"
79- # exit 1
80- # ;;
81- # esac
82- #
83- # # Run the Ubuntu24 raw image build script
84- # ./scripts/build_ubuntu24_raw .sh $ARGS
85- # echo "Ubuntu24 raw image build completed."
86- #
87- # - name: Notify on failure
88- # if: ${{ failure() && github.event_name == 'pull_request' }}
89- # env:
90- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91- # REVIEWER_ID: srmungar
92- # run: |
93- # PR_AUTHOR=$(jq --raw-output 'try .pull_request.user.login // empty' "$GITHUB_EVENT_PATH")
94- # if [ -z "$PR_AUTHOR" ]; then
95- # echo "PR_AUTHOR not found in event payload. Skipping notification."
96- # exit 0
97- # fi
98- # COMMENT_BODY="Hey @$PR_AUTHOR and @$REVIEWER_ID — the Ubuntu24 raw image build has failed. Please check the logs."
99- # curl -s -X POST \
100- # -H "Authorization: Bearer $GITHUB_TOKEN" \
101- # -H "Accept: application/vnd.github.v3+json" \
102- # --data "{\"body\": \"$COMMENT_BODY\"}" \
103- # "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
59+ - name : Run Ubuntu24 Raw Image Build
60+ env :
61+ RUN_QEMU_TEST : ${{ github.event.inputs.run_qemu_test }}
62+ run : |
63+ echo "Starting Ubuntu24 raw image build..."
64+ # Ensure script has access to docker group for Earthly
65+ sudo usermod -aG docker $USER
66+
67+ # Prepare arguments with input validation
68+ ARGS=""
69+ case "${RUN_QEMU_TEST}" in
70+ "true")
71+ ARGS="--qemu-test"
72+ echo "QEMU boot test will be run after build"
73+ ;;
74+ "false"|"")
75+ echo "QEMU boot test will be skipped"
76+ ;;
77+ *)
78+ echo "Invalid input for run_qemu_test: ${RUN_QEMU_TEST}"
79+ exit 1
80+ ;;
81+ esac
82+
83+ # Run the Ubuntu24 raw image build script
84+ ./scripts/build_ubuntu24_arm_raw .sh $ARGS
85+ echo "Ubuntu24 raw image build completed."
86+
87+ - name : Notify on failure
88+ if : ${{ failure() && github.event_name == 'pull_request' }}
89+ env :
90+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
91+ REVIEWER_ID : srmungar
92+ run : |
93+ PR_AUTHOR=$(jq --raw-output 'try .pull_request.user.login // empty' "$GITHUB_EVENT_PATH")
94+ if [ -z "$PR_AUTHOR" ]; then
95+ echo "PR_AUTHOR not found in event payload. Skipping notification."
96+ exit 0
97+ fi
98+ COMMENT_BODY="Hey @$PR_AUTHOR and @$REVIEWER_ID — the Ubuntu24 raw image build has failed. Please check the logs."
99+ curl -s -X POST \
100+ -H "Authorization: Bearer $GITHUB_TOKEN" \
101+ -H "Accept: application/vnd.github.v3+json" \
102+ --data "{\"body\": \"$COMMENT_BODY\"}" \
103+ "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
0 commit comments