name: Check

on:
  push:
    branches:
      - main
  pull_request:
    types: [opened, reopened, edited, auto_merge_enabled]

jobs:
  check:
    name: check
    runs-on: ubuntu-latest
    if: |
      contains(github.event.head_commit.message, 'bump:') == false &&
      contains(github.event.head_commit.message, 'Merge pull request') == false
    steps:
      - uses: actions/checkout@v4
      - uses: ./.actions/init
        with:
          token: "${{ secrets.CACHIX_AUTH_TOKEN }}"

      - run: nix flake check
