name: "Discord"

on:
  schedule:
    - cron: "00 01,13 * * *"
    # - cron: "0 0 * * *"

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Package Installer
        run: |
          sudo snap install ipsw
      - name: Run ipsw watch WebKit/WebKit
        run: |
          /snap/bin/ipsw watch --pattern '(?i)Lockdown Mode' --days 1 --api ${{ secrets.GITHUB_TOKEN }} --discord-id ${{ secrets.DISCORD_ID }} --discord-token ${{ secrets.DISCORD_TOKEN }} --discord-icon "https://raw.githubusercontent.com/blacktop/ipsw/master/www/static/img/webkit.png" WebKit/WebKit
          /snap/bin/ipsw watch --pattern '.*' --days 1 --api ${{ secrets.GITHUB_TOKEN }} --discord-id ${{ secrets.DISCORD_ID }} --discord-token ${{ secrets.DISCORD_TOKEN }} apple-oss-distributions/distribution-macOS --discord-icon "https://avatars.githubusercontent.com/u/91919287"
          /snap/bin/ipsw watch --pattern '.*' --days 1 --api ${{ secrets.GITHUB_TOKEN }} --discord-id ${{ secrets.DISCORD_ID }} --discord-token ${{ secrets.DISCORD_TOKEN }} apple-oss-distributions/xnu --branch 'rel/macOS-14' --discord-icon "https://avatars.githubusercontent.com/u/91919287"
          /snap/bin/ipsw watch --pattern '.*' --days 1 --api ${{ secrets.GITHUB_TOKEN }} --discord-id ${{ secrets.DISCORD_ID }} --discord-token ${{ secrets.DISCORD_TOKEN }} apple-oss-distributions/xnu --branch 'rel/macOS-15' --discord-icon "https://avatars.githubusercontent.com/u/91919287"
