refactor: consolidate workflows, update forks list with artifact names

This commit is contained in:
Tieu Long committed 2026-03-21 19:39:46 +07:00
1 parent f43565affd
commit b105a1a9ae
18 files changed
+64 -335

No files matched your search

+11 -7
View File
@@ -1,4 +1,4 @@
name: 01. Build Recovery ISO image
name: Build Recovery ISO image
on:
workflow_dispatch:
@@ -35,27 +35,31 @@ jobs:
- name: Preflight
run: |
# Third time's the charm
if [ "$GITHUB_RUN_ATTEMPT" -ge 3 ] || [ "$GITHUB_RUN_NUMBER" -ge 3 ]; then
if [ "$GITHUB_RUN_ATTEMPT" -ge 2 ] || [ "$GITHUB_RUN_NUMBER" -ge 2 ]; then
exit 0
fi
# Most users arrive directly at the Actions tab without reading the README
# This ensures they have visited the README and helps with discoverability
# Also, make sure they check out the prebuilt image in the Recent Forks list
# This reduces unnecessary forks from users who haven't checked the
# prebuilt images in the Recent Forks list (Releases tab).
FOUND=false
PAGE=1
while [ $PAGE -le 50 ]; do
DATA=$(curl -s \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/LongQT-sea/macos-iso-builder/stargazers?per_page=100&page=${PAGE}")
echo "$DATA" | grep -qi "\"login\".*\"$GITHUB_ACTOR\"" && FOUND=true && break
[ "$(echo "$DATA" | grep -c '"login"')" -lt 100 ] && break
PAGE=$((PAGE + 1))
done
if [ "$FOUND" = "false" ]; then
echo "Looks like you forgot to read the first step in the README ? :thinking:" >> $GITHUB_STEP_SUMMARY
echo "Star [the repo](https://github.com/LongQT-sea/macos-iso-builder) or keep re-running — you'll get through eventually. :wink:" >> $GITHUB_STEP_SUMMARY
echo "Head over to https://github.com/LongQT-sea/macos-iso-builder to drop a star. :star:" >> $GITHUB_STEP_SUMMARY
echo "## Before you build — check if someone already did it for you :point_down:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Browse the **[Recent Forks List](https://github.com/LongQT-sea/macos-iso-builder/releases)** — someone may have already built the macOS version you need." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "If you still need to build your own, star the repo first — that's step 1 in the [README](https://github.com/LongQT-sea/macos-iso-builder#how-to-use). :star:" >> $GITHUB_STEP_SUMMARY
echo "<br>![star](https://raw.githubusercontent.com/LongQT-sea/macos-iso-builder/main/.github/star.jpg)" >> $GITHUB_STEP_SUMMARY
exit 1
fi