List Available macOS Releases #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: List Available macOS Releases | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 2" | |
jobs: | |
list-installers: | |
runs-on: macos-latest | |
outputs: | |
list: ${{ steps.list.outputs.list }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: list | |
name: List Installers | |
run: | | |
sudo "/System/Library/PrivateFrameworks/Seeding.framework/Versions/Current/Resources/seedutil" enroll DeveloperSeed | |
sleep 5 | |
softwareupdate | |
softwareupdate --list-full-installers | |
echo "list=softwareupdate --list-full-installers" >> "$GITHUB_OUTPUT" | |
send-report: | |
runs-on: ubuntu-latest | |
needs: [list-installers] | |
env: | |
OUTPUT: ${{needs.list-installers.outputs.list}} | |
steps: | |
- name: Send Report | |
if: github.repository == 'Comp-Labs/Download-macOS' | |
uses: dawidd6/action-send-mail@v3 | |
with: | |
server_address: smtp.gmail.com | |
server_port: 465 | |
username: ${{secrets.MAIL_USERNAME}} | |
password: ${{secrets.MAIL_PASSWORD}} | |
subject: Weekly macOS List Versions Report | |
to: complabs28@gmail.com | |
from: GitHub Reports <github.reports@techfiddle.io> | |
secure: true | |
body: Logs - `$OUTPUT` | |
reply_to: complabs28@gmail.com | |
ignore_cert: true | |
convert_markdown: true | |
- name: Skipped Job Explanation | |
if: github.repository == 'Comp-Labs/Download-macOS' | |
run: echo "The 'Send Report' job is skipped because it's running on a forked repository. It can run only on the original repository - Comp-Labs/Download-macOS" | |
re-run-failed-jobs: | |
runs-on: ubuntu-latest | |
needs: [list-installers, send-report] | |
if: always() && (needs.list-installers.result == 'failure') | |
steps: | |
- name: Needs Context | |
env: | |
NEEDS_CONTEXT: ${{ toJSON(needs) }} | |
run: echo "$NEEDS_CONTEXT" |