Files
actions/.gitea/scoped_workflows/required-labels.yaml
T
2026-12-04 16:17:11 +04:00

34 lines
1.3 KiB
YAML

# Org-wide required-label gate.
#
# This file lives under SCOPED_WORKFLOW_DIRS (.gitea/scoped_workflows) and only
# runs once this repository is registered as a scoped-workflow source at the
# owner (org) level. See README.md for the rollout steps.
#
# The requirement is configured with Actions variables so repositories can
# override or opt out without editing any file:
# REQUIRED_PR_LABELS regex(es) or names, newline/comma separated
# REQUIRED_PR_LABELS_MODE any | all | exactly (default: any)
#
# Both `labeled` and `unlabeled` are listed because Gitea delivers label
# removals as `labeled`; the action always reads the full labels array.
name: Required labels
on:
pull_request:
types: [opened, reopened, labeled, unlabeled, synchronize, edited]
jobs:
required-labels:
name: Required labels
runs-on: ubuntu-latest
steps:
- name: Check required PR labels
# Absolute URL: `self:` did not resolve for a step-level composite action
# on this Gitea/runner combination (the run failed before any job
# started), while the FQDN form works.
uses: https://gitea.kosmos.org/kosmos/actions/required-labels@v1
with:
labels: ${{ vars.REQUIRED_PR_LABELS }}
mode: ${{ vars.REQUIRED_PR_LABELS_MODE }}
use-regex: "true"