add 60-minute download timeout and improved summary reporting in build.yaml
This commit is contained in:
1 parent
1203240a0e
commit
73d0fc4376
2 files changed
+45
-19
No files matched your search
+42
-16
@@ -72,6 +72,10 @@ jobs:
|
|||||||
echo "version=$INSTALLER_VERSION" >> $GITHUB_OUTPUT
|
echo "version=$INSTALLER_VERSION" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Download macOS installer
|
- name: Download macOS installer
|
||||||
|
id: download_installer
|
||||||
|
# Download should be done in 60 minutes — if it takes longer, something’s wrong with the runner.
|
||||||
|
timeout-minutes: 60
|
||||||
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
echo "Downloading macOS ${{ github.event.inputs.macos_version }} version ${{ steps.fetch_installers.outputs.version }}"
|
echo "Downloading macOS ${{ github.event.inputs.macos_version }} version ${{ steps.fetch_installers.outputs.version }}"
|
||||||
|
|
||||||
@@ -82,24 +86,28 @@ jobs:
|
|||||||
echo "Download attempt $attempt of $RETRIES_COUNT..."
|
echo "Download attempt $attempt of $RETRIES_COUNT..."
|
||||||
if softwareupdate --fetch-full-installer --full-installer-version "${{ steps.fetch_installers.outputs.version }}"; then
|
if softwareupdate --fetch-full-installer --full-installer-version "${{ steps.fetch_installers.outputs.version }}"; then
|
||||||
echo "Download successful!"
|
echo "Download successful!"
|
||||||
|
echo "download_success=true" >> $GITHUB_OUTPUT
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ $attempt -eq $RETRIES_COUNT ]; then
|
if [ $attempt -eq $RETRIES_COUNT ]; then
|
||||||
echo "Download failed after $RETRIES_COUNT attempts"
|
echo "Download failed after $RETRIES_COUNT attempts"
|
||||||
|
echo "download_success=false" >> $GITHUB_OUTPUT
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Retrying in 5s..."
|
echo "Retrying in 5s..."
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
|
|
||||||
# Verify installer exists and set path
|
- name: Check download status
|
||||||
INSTALLER_PATH="/Applications/Install macOS ${{ github.event.inputs.macos_version }}.app"
|
if: always()
|
||||||
if [ ! -d "$INSTALLER_PATH" ]; then
|
run: |
|
||||||
echo "Error: Installer not found at $INSTALLER_PATH"
|
if [ "${{ steps.download_installer.outcome }}" == "failure" ] || [ "${{ steps.download_installer.outcome }}" == "cancelled" ]; then
|
||||||
ls -la /Applications/Install*.app 2>/dev/null || echo "No Install*.app found"
|
echo "download_failed=true" >> $GITHUB_ENV
|
||||||
exit 1
|
elif [ "${{ steps.download_installer.outputs.download_success }}" != "true" ]; then
|
||||||
|
echo "download_failed=true" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "download_failed=false" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
echo "Installer found at: $INSTALLER_PATH"
|
|
||||||
|
|
||||||
- name: Create ISO
|
- name: Create ISO
|
||||||
if: github.event.inputs.image_format == 'iso'
|
if: github.event.inputs.image_format == 'iso'
|
||||||
@@ -114,7 +122,7 @@ jobs:
|
|||||||
ISO_FILE="${GITHUB_WORKSPACE}/${ISO_NAME}.iso"
|
ISO_FILE="${GITHUB_WORKSPACE}/${ISO_NAME}.iso"
|
||||||
VOLUME_NAME="myvolume"
|
VOLUME_NAME="myvolume"
|
||||||
INSTALLER_PATH="/Applications/Install macOS ${{ github.event.inputs.macos_version }}.app"
|
INSTALLER_PATH="/Applications/Install macOS ${{ github.event.inputs.macos_version }}.app"
|
||||||
RETRIES_COUNT=5
|
RETRIES_COUNT=10
|
||||||
|
|
||||||
echo "ISO will be created at: $ISO_FILE"
|
echo "ISO will be created at: $ISO_FILE"
|
||||||
echo "Using installer at: $INSTALLER_PATH"
|
echo "Using installer at: $INSTALLER_PATH"
|
||||||
@@ -176,9 +184,9 @@ jobs:
|
|||||||
DMG_NAME="macOS_${{ github.event.inputs.macos_version }}_${{ steps.fetch_installers.outputs.version }}"
|
DMG_NAME="macOS_${{ github.event.inputs.macos_version }}_${{ steps.fetch_installers.outputs.version }}"
|
||||||
DMG_NAME="${DMG_NAME// /_}"
|
DMG_NAME="${DMG_NAME// /_}"
|
||||||
DMG_FILE="${GITHUB_WORKSPACE}/${DMG_NAME}.dmg"
|
DMG_FILE="${GITHUB_WORKSPACE}/${DMG_NAME}.dmg"
|
||||||
VOLUME_NAME="Install_Temp"
|
VOLUME_NAME="myvolume"
|
||||||
INSTALLER_PATH="/Applications/Install macOS ${{ github.event.inputs.macos_version }}.app"
|
INSTALLER_PATH="/Applications/Install macOS ${{ github.event.inputs.macos_version }}.app"
|
||||||
RETRIES_COUNT=5
|
RETRIES_COUNT=10
|
||||||
|
|
||||||
echo "DMG will be created at: $DMG_FILE"
|
echo "DMG will be created at: $DMG_FILE"
|
||||||
echo "Using installer at: $INSTALLER_PATH"
|
echo "Using installer at: $INSTALLER_PATH"
|
||||||
@@ -282,11 +290,29 @@ jobs:
|
|||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
- name: Summary
|
- name: Summary
|
||||||
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ github.event.inputs.image_format }}" == "iso" ]; then
|
if [ "${{ env.download_failed }}" == "true" ]; then
|
||||||
echo "## Successfully built macOS ${{ github.event.inputs.macos_version }} ${{ steps.fetch_installers.outputs.version }} ISO" >> $GITHUB_STEP_SUMMARY
|
echo "## Download Failed" >> $GITHUB_STEP_SUMMARY
|
||||||
else
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "## Successfully built macOS ${{ github.event.inputs.macos_version }} ${{ steps.fetch_installers.outputs.version }} DMG" >> $GITHUB_STEP_SUMMARY
|
echo "The macOS installer download has failed." >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "> This runner may have network issues. Please **re-run the workflow** to try a different runner." >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "> [!TIP]" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "> If downloads consistently fail, try:" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "> - Running during off-peak hours" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "> - Selecting a different macOS version" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "> - Or build Recovery ISO instead" >> $GITHUB_STEP_SUMMARY
|
||||||
|
elif [ "${{ job.status }}" == "success" ]; then
|
||||||
|
if [ "${{ github.event.inputs.image_format }}" == "iso" ]; then
|
||||||
|
echo "## Successfully built macOS ${{ github.event.inputs.macos_version }} ${{ steps.fetch_installers.outputs.version }} ISO" >> $GITHUB_STEP_SUMMARY
|
||||||
|
else
|
||||||
|
echo "## Successfully built macOS ${{ github.event.inputs.macos_version }} ${{ steps.fetch_installers.outputs.version }} DMG" >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "> [!TIP]" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "> Enable [Cloudflare WARP](https://one.one.one.one/) for faster downloads." >> $GITHUB_STEP_SUMMARY
|
||||||
fi
|
fi
|
||||||
echo "> [!Tip]" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "> Enable [Cloudflare WARP](https://one.one.one.one/) for faster downloads." >> $GITHUB_STEP_SUMMARY
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# macOS Installer ISO Builder with GitHub Actions
|
# macOS Installer ISO Builder via GitHub Actions – no Mac required
|
||||||
|
|
||||||
Generate bootable macOS installer ISO or DMG images directly from Apple servers via GitHub Actions. Includes intelligent file size optimization to achieve absolute smallest possible installer images.
|
Generate bootable macOS installer ISO or DMG images directly from Apple’s servers via GitHub Actions. Includes intelligent size optimization to produce the smallest possible installer images.
|
||||||
|
|
||||||
**Supported formats:**
|
**Supported formats:**
|
||||||
* **ISO** – True DVD format compatible with **Proxmox VE**, **QEMU**, **VirtualBox**, and **VMware**
|
* **ISO** – True DVD format compatible with **Proxmox VE**, **QEMU**, **VirtualBox**, and **VMware**
|
||||||
@@ -30,7 +30,7 @@ Generate bootable macOS installer ISO or DMG images directly from Apple servers
|
|||||||
* **Image format** – Choose `iso` for virtual machines or `dmg` for bootable USB drives.
|
* **Image format** – Choose `iso` for virtual machines or `dmg` for bootable USB drives.
|
||||||
* **Specific version** *(optional)* – Enter a version like `15.6.1`, or leave blank for the latest.
|
* **Specific version** *(optional)* – Enter a version like `15.6.1`, or leave blank for the latest.
|
||||||
7. Click the green button **"Run workflow"** to start the build.
|
7. Click the green button **"Run workflow"** to start the build.
|
||||||
8. Wait for the workflow to complete (this may take 15-60 minutes).
|
8. Wait for the workflow to complete (this may take 20-60 minutes).
|
||||||
9. Open the completed workflow run and scroll to the **Artifacts** section.
|
9. Open the completed workflow run and scroll to the **Artifacts** section.
|
||||||
10. Download the artifact (e.g., `macOS-Sequoia-15.6.1-ISO`).
|
10. Download the artifact (e.g., `macOS-Sequoia-15.6.1-ISO`).
|
||||||
> [!Tip]
|
> [!Tip]
|
||||||
|
|||||||
Reference in new issue
Block a user