name: Build and push a branch gpu image to ghcr

on:
  workflow_dispatch:

permissions:
  contents: read

jobs:
  branch-gpu-build-and-push:
    runs-on: [self-hosted, linux, x64]
    permissions:
      contents: read
      packages: write
    steps:
        - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
          with:
            ref: ${{ github.ref_name }}
        - uses: ./.github/actions/branch-build-and-push
          with:
            ghcr-password: ${{ secrets.GITHUB_TOKEN }}
            push-to-ghcr: true
            build-gpu: true
            staging-build: ${{ github.ref_type == 'branch' && github.ref_name != 'master' }}
