name: 🚨 Check commit signing

on:
  push:
    branches:
      - long_lived/**
      - main
      - release/**
  pull_request:
    branches:
      - "**"

concurrency:
  # SHA is added to the end if on `main` to let all main workflows run
  group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
  cancel-in-progress: true

jobs:
  check-commit-signing:
    name: Check commit signing
    runs-on: [ubuntu-latest]
    timeout-minutes: 5

    steps:
      - name: Checkout Code
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: chia-network/actions/check-commit-signing@main
