mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-03 13:56:07 +00:00
Add repository guard (github.repository == 'velero-io/velero') to workflows that should only run on the upstream repo. This prevents unnecessary CI runs on forks like openshift/velero where these workflows either fail due to missing secrets/config or duplicate fork-specific CI. Guarded workflows: auto_assign_prs, auto_label_prs, auto_request_review, e2e-test-kind, nightly-trivy-scan, pr-changelog-check, pr-codespell, pr-filepath-check, pr-linter-check, prow-action, rebase, stale-issues. Intentionally left unguarded: pr-ci-check (useful for contributors on forks), get-go-version (reusable workflow_call only). Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
21 lines
828 B
YAML
21 lines
828 B
YAML
name: Pull Request Changelog Check
|
|
# by setting `on: [pull_request]`, that means action will be trigger when PR is opened, synchronize, reopened.
|
|
# Add labeled and unlabeled events too.
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, labeled, unlabeled]
|
|
jobs:
|
|
|
|
build:
|
|
if: github.repository == 'velero-io/velero'
|
|
name: Run Changelog Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Check out the code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Changelog check
|
|
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'kind/changelog-not-required') || contains(github.event.pull_request.labels.*.name, 'Design') || contains(github.event.pull_request.labels.*.name, 'Website') || contains(github.event.pull_request.labels.*.name, 'Documentation'))}}
|
|
run: ./hack/changelog-check.sh
|