feat: auto generate fork list to reduce Actions usage

- Encourage users to check existing builds before running workflows
- Helps conserve free GitHub-hosted runner resources
This commit is contained in:
Tieu Long committed 2026-01-21 21:28:12 +07:00
1 parent 6656def855
commit 7c0117b0ef
4 files changed
+102 -14

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
name: Build macOS Recovery ISO image
name: Build Recovery ISO image
on:
workflow_dispatch:
+2 -2
View File
@@ -1,4 +1,4 @@
name: Build macOS Installer ISO/DMG image
name: Build Full Installer ISO/DMG image
on:
workflow_dispatch:
@@ -32,7 +32,7 @@ on:
- 'dmg'
jobs:
build-macos-installer-image:
build-macos-image:
runs-on: macos-15-intel
timeout-minutes: 70
+80
View File
@@ -0,0 +1,80 @@
name: Refresh forks list
on:
schedule:
- cron: '0 */6 * * *' # Run every 6 hours
workflow_dispatch:
jobs:
refresh-forks:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Fetch fork data
id: fetch_forks
run: |
THIRTY_DAYS_AGO=$(date -u -d '30 days ago' +%Y-%m-%dT%H:%M:%SZ)
curl -s -H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/forks?sort=newest&per_page=100" \
> forks.json
jq --arg date "$THIRTY_DAYS_AGO" \
'[.[] | select(.created_at > $date) | {
owner: .owner.login,
name: .name,
html_url: .html_url,
created_at: .created_at,
updated_at: .updated_at
}]' forks.json > recent_forks.json
- name: Generate Forks content
run: |
CURRENT_TIME=$(date -u +"%Y-%m-%d %H:%M UTC")
cat > release_notes.md << 'EOF'
## How to Use This List
1. Sign in to your GitHub account https://github.com/login
2. Browse links in the list below to find the image you need
3. Click on a successful workflow runs (green checkmark)
4. Scroll down to **Artifacts** section to download it
---
## Recently Active Forks
| Recent Fork | Created | Last Activity |
|-------------|---------|---------------|
EOF
jq -r '.[] | "| [\(.owner)/\(.name)](https://github.com/\(.owner)/\(.name)/actions) | \(.created_at[:10]) | \(.updated_at[:10]) |"' recent_forks.json >> release_notes.md
cat >> release_notes.md << EOF
---
* **Last updated:** ${CURRENT_TIME}
* **Auto-updates:** This list refreshes every 6 hours
---
### Can't Find What You Need?
If none of the recent forks have the macOS version you need:
1. [Fork this repository](../../fork)
2. Follow the [Usage Guide](../../#usage-guide) to build your own image
3. Your fork will appear here for others to benefit from!
EOF
- name: Update release notes
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release edit forks-list --notes-file release_notes.md
+19 -11
View File
@@ -7,14 +7,17 @@ A comprehensive toolkit for creating bootable macOS installer images, consisting
## Quick Start
See [Usage](#usage) for detailed instructions.
> [!Note]
> **New users:** Before building, open [Release page](https://github.com/LongQT-sea/mkmaciso/releases) to see if someone already built what you need!
See [Usage Guide](#usage-guide) for detailed instructions.
## Table of Contents
- [Image Format Details](#image-format-details)
- [Supported macOS Versions](#supported-macos-versions)
- [Usage](#usage)
- [Tips and Best Practices](#tips-and-best-practices)
- [Usage Guide](#usage-guide)
- [Usage Tips](#usage-tips)
- [Requirements for mkmaciso](#requirements-for-mkmaciso)
- [Acknowledgments](#acknowledgments)
- [Legal Notice](#legal-notice)
@@ -55,9 +58,12 @@ The `mkmaciso` script can generate macOS installer images in two different forma
---
## Usage
### Method 1: GitHub workflows (for users who don't have a working macOS)
## Usage Guide
Two methods are available:
- [Method 1](#method-1): Run `mkmaciso` in the cloud using GitHub Action, for users who don't have a working macOS
- [Method 2](#method-2): Run `mkmaciso` locally, for users who already have macOS
### Method 1
**Available workflows:**
* **Recovery ISO (Recommended)** – Lightweight recovery image (build takes ~2-5 min) • Best for virtualization
* **Full Installer** – Complete offline installer (build takes ~10-60 min, 5-18GB) • Best for offline use
@@ -73,7 +79,7 @@ The `mkmaciso` script can generate macOS installer images in two different forma
1. **Fork** this repository (requires a GitHub account).
2. Navigate to the **Actions** tab in your forked repository.
3. Click the green **"I understand my workflows, go ahead and enable them"** button.
4. Select the **"Build macOS Installer ISO/DMG image"** or **"Build macOS Recovery ISO image"** workflow from the left sidebar.
4. Select the **"Build Full Installer ISO/DMG image"** or **"Build Recovery ISO image"** workflow from the left sidebar.
5. Click the **"Run workflow"** button.
6. Configure the workflow inputs:
@@ -87,9 +93,11 @@ The `mkmaciso` script can generate macOS installer images in two different forma
> [!NOTE]
> By default, artifacts are kept for 7 days. You can change this in the workflow YAML file.
### Method 2: Run `mkmaciso` locally (for users who already have macOS)
---
If you already have access to a working macOS system or macOS virtual machine, you can run the script directly:
### Method 2
If you already have access to a working macOS system or macOS virtual machine, you can run the script directly using Terminal.app:
**Quick run** (replace 'tahoe' with your desired version):
```bash
@@ -111,7 +119,7 @@ chmod +x mkmaciso
---
## Tips and Best Practices
## Usage Tips
### For Virtual Machines (ISO Format)
> [!NOTE]
@@ -138,7 +146,7 @@ chmod +x mkmaciso
| Requirement | Details |
|-------------|---------|
| **OS** | Minimum macOS 10.9+ (macOS 11+ recommended) |
| **OS** | Minimum macOS 10.9 (macOS 11+ recommended) |
| **Architecture** | Intel (x86_64) recommended; Apple Silicon supported with limitations |
| **Disk Space** | 20-40 GB temporary; final image varies |
| **Internet** | Required for downloading from Apple servers |
@@ -162,4 +170,4 @@ This tool downloads macOS images directly from Apple's official servers. Users a
## License
This project is licensed under the GPLv3 License. See [LICENSE](LICENSE) for details.
This project is licensed under the GPLv3 License. See [LICENSE](LICENSE) for details.