refactor: consolidate workflows, update forks list with artifact names
This commit is contained in:
18 files changed
+64
-335
No files matched your search
@@ -1,21 +0,0 @@
|
|||||||
name: 07. Build macOS Big Sur
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'Big Sur'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: 08. Build macOS Catalina
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'Catalina'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: 12. Build macOS El Capitan
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'El Capitan'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: 10. Build macOS High Sierra
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'High Sierra'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: 16. Build macOS Lion
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'Lion'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
+37
-9
@@ -1,17 +1,41 @@
|
|||||||
name: Build macOS reusable template
|
name: Build Full Installer ISO/DMG image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
macos_version:
|
macos_version:
|
||||||
|
description: "Choose a macOS version to build."
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: choice
|
||||||
|
options:
|
||||||
|
- ''
|
||||||
|
- 'Tahoe'
|
||||||
|
- 'Sequoia'
|
||||||
|
- 'Sonoma'
|
||||||
|
- 'Ventura'
|
||||||
|
- 'Monterey'
|
||||||
|
- 'Big Sur'
|
||||||
|
- 'Catalina'
|
||||||
|
- 'Mojave'
|
||||||
|
- 'High Sierra'
|
||||||
|
- 'Sierra'
|
||||||
|
- 'El Capitan'
|
||||||
|
- 'Yosemite'
|
||||||
|
- 'Mavericks'
|
||||||
|
- 'Mountain Lion'
|
||||||
|
- 'Lion'
|
||||||
image_format:
|
image_format:
|
||||||
|
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: choice
|
||||||
|
options:
|
||||||
|
- ''
|
||||||
|
- 'iso'
|
||||||
|
- 'dmg'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-macos-image:
|
build-macos-image:
|
||||||
|
if: ${{ inputs.macos_version != '' && inputs.image_format != '' }}
|
||||||
runs-on: macos-15-intel
|
runs-on: macos-15-intel
|
||||||
timeout-minutes: 80
|
timeout-minutes: 80
|
||||||
|
|
||||||
@@ -24,22 +48,26 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Most users arrive directly at the Actions tab without reading the README
|
# Most users arrive directly at the Actions tab without reading the README
|
||||||
# This ensures they have visited the README and helps with discoverability
|
# This reduces unnecessary forks from users who haven't checked the
|
||||||
# Also, make sure they check out the prebuilt image in the Recent Forks list
|
# prebuilt images in the Recent Forks list (Releases tab).
|
||||||
FOUND=false
|
FOUND=false
|
||||||
PAGE=1
|
PAGE=1
|
||||||
while [ $PAGE -le 50 ]; do
|
while [ $PAGE -le 50 ]; do
|
||||||
DATA=$(curl -s \
|
DATA=$(curl -s \
|
||||||
-H "Accept: application/vnd.github+json" \
|
-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}")
|
"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 -qi "\"login\".*\"$GITHUB_ACTOR\"" && FOUND=true && break
|
||||||
[ "$(echo "$DATA" | grep -c '"login"')" -lt 100 ] && break
|
[ "$(echo "$DATA" | grep -c '"login"')" -lt 100 ] && break
|
||||||
PAGE=$((PAGE + 1))
|
PAGE=$((PAGE + 1))
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$FOUND" = "false" ]; then
|
if [ "$FOUND" = "false" ]; then
|
||||||
echo "Looks like you forgot to read the first step in the README ? :thinking:" >> $GITHUB_STEP_SUMMARY
|
echo "## Before you build — check if someone already did it for you :point_down:" >> $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 "" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Head over to https://github.com/LongQT-sea/macos-iso-builder to drop a star. :star:" >> $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>" >> $GITHUB_STEP_SUMMARY
|
echo "<br>" >> $GITHUB_STEP_SUMMARY
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: 14. Build macOS Mavericks
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'Mavericks'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: 09. Build macOS Mojave
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'Mojave'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: 06. Build macOS Monterey
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'Monterey'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: 15. Build macOS Mountain Lion
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'Mountain Lion'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: 01. Build Recovery ISO image
|
name: Build Recovery ISO image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -35,27 +35,31 @@ jobs:
|
|||||||
- name: Preflight
|
- name: Preflight
|
||||||
run: |
|
run: |
|
||||||
# Third time's the charm
|
# 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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Most users arrive directly at the Actions tab without reading the README
|
# Most users arrive directly at the Actions tab without reading the README
|
||||||
# This ensures they have visited the README and helps with discoverability
|
# This reduces unnecessary forks from users who haven't checked the
|
||||||
# Also, make sure they check out the prebuilt image in the Recent Forks list
|
# prebuilt images in the Recent Forks list (Releases tab).
|
||||||
FOUND=false
|
FOUND=false
|
||||||
PAGE=1
|
PAGE=1
|
||||||
while [ $PAGE -le 50 ]; do
|
while [ $PAGE -le 50 ]; do
|
||||||
DATA=$(curl -s \
|
DATA=$(curl -s \
|
||||||
-H "Accept: application/vnd.github+json" \
|
-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}")
|
"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 -qi "\"login\".*\"$GITHUB_ACTOR\"" && FOUND=true && break
|
||||||
[ "$(echo "$DATA" | grep -c '"login"')" -lt 100 ] && break
|
[ "$(echo "$DATA" | grep -c '"login"')" -lt 100 ] && break
|
||||||
PAGE=$((PAGE + 1))
|
PAGE=$((PAGE + 1))
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$FOUND" = "false" ]; then
|
if [ "$FOUND" = "false" ]; then
|
||||||
echo "Looks like you forgot to read the first step in the README ? :thinking:" >> $GITHUB_STEP_SUMMARY
|
echo "## Before you build — check if someone already did it for you :point_down:" >> $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 "" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Head over to https://github.com/LongQT-sea/macos-iso-builder to drop a star. :star:" >> $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>" >> $GITHUB_STEP_SUMMARY
|
echo "<br>" >> $GITHUB_STEP_SUMMARY
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
name: 03. Build macOS Sequoia
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'Sequoia'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: 11. Build macOS Sierra
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'Sierra'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: 04. Build macOS Sonoma
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'Sonoma'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: 02. Build macOS Tahoe
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'Tahoe'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: 05. Build macOS Ventura
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'Ventura'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: 13. Build macOS Yosemite
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
image_format:
|
|
||||||
description: "Choose 'iso' for virtual machines, 'dmg' for flash to USB drive."
|
|
||||||
required: true
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ''
|
|
||||||
- 'iso'
|
|
||||||
- 'dmg'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ inputs.image_format != '' }}
|
|
||||||
uses: ./.github/workflows/build-macos-template.yml
|
|
||||||
with:
|
|
||||||
macos_version: 'Yosemite'
|
|
||||||
image_format: ${{ inputs.image_format }}
|
|
||||||
@@ -55,20 +55,32 @@ jobs:
|
|||||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||||
"https://api.github.com/repos/$OWNER/$REPO/actions/runs?per_page=1&status=success")
|
"https://api.github.com/repos/$OWNER/$REPO/actions/runs?per_page=1&status=success")
|
||||||
|
|
||||||
RUN_TITLE=$(echo "$RUN_INFO" | jq -r '.workflow_runs[0].display_title // "N/A"')
|
RUN_ID=$(echo "$RUN_INFO" | jq -r '.workflow_runs[0].id // ""')
|
||||||
RUN_URL=$(echo "$RUN_INFO" | jq -r '.workflow_runs[0].html_url // "#"')
|
RUN_URL=$(echo "$RUN_INFO" | jq -r '.workflow_runs[0].html_url // "#"')
|
||||||
RUN_DATE=$(echo "$RUN_INFO" | jq -r '.workflow_runs[0].run_started_at // "" | if . != "" then .[:10] else "" end')
|
RUN_DATE=$(echo "$RUN_INFO" | jq -r '.workflow_runs[0].run_started_at // "" | if . != "" then .[:10] else "" end')
|
||||||
|
|
||||||
|
ARTIFACT_NAME="N/A"
|
||||||
|
if [ -n "$RUN_ID" ] && [ "$RUN_ID" != "null" ]; then
|
||||||
|
ARTIFACT_NAME=$(curl --silent --show-error \
|
||||||
|
--retry 5 --retry-delay 2 --retry-max-time 60 --retry-connrefused \
|
||||||
|
--connect-timeout 10 --max-time 30 \
|
||||||
|
-H "Authorization: Bearer $GH_TOKEN" \
|
||||||
|
-H "Accept: application/vnd.github+json" \
|
||||||
|
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||||
|
"https://api.github.com/repos/$OWNER/$REPO/actions/runs/$RUN_ID/artifacts" \
|
||||||
|
| jq -r '.artifacts[0].name // "N/A"')
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$FIRST" = false ]; then echo "," >> runs_data.json; fi
|
if [ "$FIRST" = false ]; then echo "," >> runs_data.json; fi
|
||||||
|
|
||||||
jq -n \
|
jq -n \
|
||||||
--arg owner "$OWNER" \
|
--arg owner "$OWNER" \
|
||||||
--arg repo "$REPO" \
|
--arg repo "$REPO" \
|
||||||
--arg created "$CREATED" \
|
--arg created "$CREATED" \
|
||||||
--arg run_title "$RUN_TITLE" \
|
--arg artifact_name "$ARTIFACT_NAME" \
|
||||||
--arg run_url "$RUN_URL" \
|
--arg run_url "$RUN_URL" \
|
||||||
--arg run_date "$RUN_DATE" \
|
--arg run_date "$RUN_DATE" \
|
||||||
'{owner: $owner, name: $repo, created_at: $created, run_title: $run_title, run_url: $run_url, run_date: $run_date}' \
|
'{owner: $owner, name: $repo, created_at: $created, artifact_name: $artifact_name, run_url: $run_url, run_date: $run_date}' \
|
||||||
>> runs_data.json
|
>> runs_data.json
|
||||||
|
|
||||||
FIRST=false
|
FIRST=false
|
||||||
@@ -120,7 +132,7 @@ jobs:
|
|||||||
|-------------|--------------|------------|--------------|
|
|-------------|--------------|------------|--------------|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
jq -r '.[] | "| [\(.owner)/\(.name)](https://github.com/\(.owner)/\(.name)/actions) | [\(.run_title)](\(.run_url)) | \(.run_date) | \(.created_at[:10]) |"' runs_data.json >> release_notes.md
|
jq -r '.[] | select(.artifact_name != "N/A") | "| [\(.owner)/\(.name)](https://github.com/\(.owner)/\(.name)/actions) | [\(.artifact_name)](\(.run_url)) | \(.run_date) | \(.created_at[:10]) |"' runs_data.json >> release_notes.md
|
||||||
|
|
||||||
cat >> release_notes.md << EOF
|
cat >> release_notes.md << EOF
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user