Discord #23014
This file contains hidden or 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: "Discord" | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| skip_post: | |
| description: "Skip posting to Social Media" | |
| required: false | |
| type: boolean | |
| schedule: | |
| # - cron: "0 */1 * * *" # every 1 hour | |
| - cron: "*/30 * * * *" # every 30 minutes | |
| # - cron: "0 0 * * *" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check Cache | |
| run: | | |
| cat hack/.watch_cache || echo "No cache found" | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26" | |
| - name: Run ipsw watch WebKit/WebKit (Security Features) | |
| run: | | |
| go run ./cmd/ipsw/main.go watch WebKit/WebKit --pattern '(?i)Lockdown Mode|Memory Tagging|EnhancedSecurity|Enhanced Security|(?-i:MTE)' --days 1 \ | |
| --cache hack/.watch_cache \ | |
| --api ${{ secrets.GITHUB_TOKEN }} \ | |
| --discord \ | |
| --discord-id ${{ secrets.DISCORD_ID }} \ | |
| --discord-token ${{ secrets.DISCORD_TOKEN }} \ | |
| --discord-icon "https://raw.githubusercontent.com/blacktop/ipsw/master/www/static/img/webkit.png" | |
| - name: Run ipsw watch WebKit/WebKit tags | |
| if: ${{ !inputs.skip_post }} | |
| run: | | |
| go run ./cmd/ipsw/main.go watch WebKit/WebKit --tags \ | |
| --cache hack/.watch_cache \ | |
| --api ${{ secrets.GITHUB_TOKEN }} \ | |
| --discord \ | |
| --discord-id ${{ secrets.DISCORD_ID }} \ | |
| --discord-token ${{ secrets.DISCORD_TOKEN }} \ | |
| --discord-icon "https://raw.githubusercontent.com/blacktop/ipsw/master/www/static/img/webkit.png" | |
| - name: Run ipsw watch apple-oss-distributions/distribution-macOS | |
| if: ${{ !inputs.skip_post }} | |
| run: | | |
| go run ./cmd/ipsw/main.go watch apple-oss-distributions/distribution-macOS --tags --post \ | |
| --cache hack/.watch_cache \ | |
| --api ${{ secrets.GITHUB_TOKEN }} \ | |
| --discord \ | |
| --discord-id ${{ secrets.DISCORD_ID }} \ | |
| --discord-token ${{ secrets.DISCORD_TOKEN }} \ | |
| --discord-icon "https://avatars.githubusercontent.com/u/91919287" | |
| # --mastodon \ | |
| # --mastodon-client-id ${{ secrets.MASTODON_CLIENT_ID }} \ | |
| # --mastodon-client-secret ${{ secrets.MASTODON_CLIENT_SECRET }} \ | |
| # --mastodon-access-token ${{ secrets.MASTODON_ACCESS_TOKEN }} | |
| - name: Run ipsw watch apple-oss-distributions/distribution-macOS (SKIP MASTODON) | |
| if: ${{ inputs.skip_post }} | |
| run: | | |
| go run ./cmd/ipsw/main.go watch apple-oss-distributions/distribution-macOS --tags --post \ | |
| --cache hack/.watch_cache \ | |
| --api ${{ secrets.GITHUB_TOKEN }} \ | |
| --discord \ | |
| --discord-id ${{ secrets.DISCORD_ID }} \ | |
| --discord-token ${{ secrets.DISCORD_TOKEN }} \ | |
| --discord-icon "https://avatars.githubusercontent.com/u/91919287" | |
| # --mastodon \ | |
| # --mastodon-client-id ${{ secrets.MASTODON_CLIENT_ID }} \ | |
| # --mastodon-client-secret ${{ secrets.MASTODON_CLIENT_SECRET }} \ | |
| # --mastodon-access-token ${{ secrets.MASTODON_ACCESS_TOKEN }} | |
| - uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v5 | |
| with: | |
| commit_message: Update .watch_cache | |
| # - name: Commit Cache Changes | |
| # run: | |
| # if [[ -n $(git status --porcelain) ]]; then | |
| # git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| # git config --global user.name "github-actions[bot]" | |
| # git add hack/.watch_cache | |
| # git commit -m "Update .watch_cache" | |
| # git push | |
| # fi |