name: bump-command
on:
  repository_dispatch:
    types: [bump-command]

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

      # Checkout the pull request branch
      - uses: actions/checkout@v2
        with:
          token: ${{ secrets.TUVOK_TOKEN }}
          repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
          ref: ${{ github.event.client_payload.pull_request.head.ref }}
          submodules: recursive

      - uses: expipiplus1/action-automation/bump-version@HEAD
        with:
          packageInfos: |
            vulkan v .
            vma vma-v VulkanMemoryAllocator
            utils utils-v utils
          packageVersions: |
            ${{ toJson(github.event.client_payload.slash_command.args.named) }}

      - run: |
          git push origin HEAD:${{ github.event.client_payload.pull_request.head.ref }}

      - name: Add reaction
        uses: peter-evans/create-or-update-comment@v1
        with:
          token: ${{ secrets.TUVOK_TOKEN }}
          repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
          comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
          reaction-type: rocket

name: bump-command
on:
  repository_dispatch:
    types: [bump-command]

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

      # Checkout the pull request branch
      - uses: actions/checkout@v2
        with:
          ssh-key: ${{ secrets.DEPLOY_KEY }}
          repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
          ref: ${{ github.event.client_payload.pull_request.head.ref }}
          submodules: recursive

      - uses: expipiplus1/action-automation/bump-version@HEAD
        with:
          packageInfos: |
            vulkan v .
            vma vma-v VulkanMemoryAllocator
            utils utils-v utils
          packageVersions: |
            ${{ toJson(github.event.client_payload.slash_command.args.named) }}

      - run: |
          git push origin HEAD:${{ github.event.client_payload.pull_request.head.ref }}

      - name: Add reaction
        uses: peter-evans/create-or-update-comment@v1
        with:
          token: ${{ secrets.TUVOK_TOKEN }}
          repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
          comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
          reaction-type: rocket

Use deploy-key for adding tags
Use deploy-key for adding tags
