name: "Publish every Git push to main to FlakeHub"
on:
  push:
    branches:
      - "main"
defaults:
  run:
    shell: bash
jobs:
  flakehub-publish:
    if: github.repository == 'nix-community/nixvim'
    runs-on: "ubuntu-latest"
    permissions:
      id-token: "write"
      contents: "read"
    steps:
      - uses: "actions/checkout@v7"
      - uses: "DeterminateSystems/nix-installer-action@main"
      - uses: "DeterminateSystems/flakehub-push@main"
        with:
          name: ${{ github.repository }}
          rolling: true
          visibility: "public"
