name: Update iOS releases and version numbers
run-name: ${{ github.actor }} is finding the latest iOS release version and build numbers
on:
  workflow_dispatch:
  schedule:
    # * is a special character in YAML so you have to quote this string
    - cron:  '0 */6 * * *'


jobs:
  update-ios-version:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
      - name: Run script to fetch latest iOS releases from Apple RSS feed.
        run: python3 .github/workflows/scripts/update-ios-releases.py
      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v5
        with:
          title: '[auto] Update iOS releases and versions'
          commit-message: Add new iOS versions and build numbers
          branch: auto/add-new-ios-releases
          draft: true
          body: |
            This is an automated pull request to update the iOS releases and version numbers.
          add-paths: |
            *.json
          labels: |
            automated pr