name: Auto Update

on:
  # schedule:
  #   - cron: '*/5 * * * *'
  workflow_dispatch:

jobs:
  nix:
    runs-on: ubuntu-20.04
    steps:
    - uses: actions/checkout@v2
      with:
        submodules: 'recursive'
    - uses: cachix/install-nix-action@v8
    - uses: cachix/cachix-action@v6
      with:
        name: vulkan-haskell
        signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'

    - name: Init git
      run: |
        git config user.name 'Joe Hermaszewski'
        git config user.email 'expipiplus1@users.noreply.github.com'
    - run: ./update.sh

    - name: Create Pull Request
      uses: peter-evans/create-pull-request@v3

name: Auto Update

on:
  # schedule:
  #   - cron: '*/5 * * * *'
  workflow_dispatch:

jobs:
  nix:
    runs-on: ubuntu-20.04
    steps:
    - uses: actions/checkout@v2
      with:
        submodules: 'recursive'
    - uses: cachix/install-nix-action@v8
    - uses: cachix/cachix-action@v6
      with:
        name: vulkan-haskell
        signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'

    - uses: tibdex/github-app-token@v1
      id: generate-token
      with:
        app_id: '${{ secrets.APP_ID }}'
        private_key: '${{ secrets.APP_PRIVATE_KEY }}'

    - name: Init git
      run: |
        git config user.name 'Three Of Twelve'
        git config user.email 'expipiplus1@users.noreply.github.com'
    - run: ./update.sh
    - run: export VULKAN_VERSION=$(git -C generate-new/Vulkan-Docs describe --tags | head -n1)

    - name: Create Pull Request
      uses: peter-evans/create-pull-request@v3
      with:
        token: ${{ steps.generate-token.outputs.token }}
        delete-branch: true
        branch: vulkan-updates-${{ env.VULKAN_VERSION }}
        title: Update Vulkan to ${{ env.VULKAN_VERSION }}

Use bot to open update PR
Use bot to open update PR
