Skip to content

fix(ci-cd): don't run labeler on PRs from forks #60

fix(ci-cd): don't run labeler on PRs from forks

fix(ci-cd): don't run labeler on PRs from forks #60

Workflow file for this run

name: "Labeler"
on:
pull_request:
types: [opened, synchronize]
workflow_dispatch:
schedule:
# run every full hour (to still label PRs from forks)
- cron: '0 * * * *'
jobs:
labeler:
permissions:
contents: read
pull-requests: write
issues: write
# don't run on PRs from forks (token has no write permissions)
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
name: "Labeler"
runs-on: ubuntu-latest
steps:
# Re-uses the labeler config from the Go SDK, so we only need to maintain one single config file
- name: Fetch labeler config from STACKIT Go SDK
run: |
curl -sSL -o remote-labeler.yml https://raw.githubusercontent.com/stackitcloud/stackit-sdk-go/main/.github/labeler.yml
- name: Labeler action
uses: actions/labeler@v6
with:
configuration-path: "remote-labeler.yml"
sync-labels: false