List Available macOS Releases #149
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-12 | |
outputs: | |
list: ${{ steps.list.outputs.stdout }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: List Installers | |
uses: mathiasvr/[email protected] | |
id: list | |
with: | |
run: | | |
softwareupdate | |
softwareupdate --list-full-installers | |
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: [email protected] | |
from: GitHub Reports <[email protected]> | |
secure: true | |
body: Logs - ${{env.OUTPUT}} | |
reply_to: [email protected] | |
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" |