mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-07-27 18:42:40 +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>
24 lines
642 B
YAML
24 lines
642 B
YAML
---
|
|
name: "Auto Assign Author"
|
|
|
|
# pull_request_target means that this will run on pull requests, but in
|
|
# the context of the base repo. This should mean PRs from forks are supported.
|
|
on:
|
|
pull_request_target:
|
|
types: [opened, reopened, ready_for_review]
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
# Automatically assigns reviewers and owner
|
|
add-reviews:
|
|
if: github.repository == 'velero-io/velero'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set the author of a PR as the assignee
|
|
uses: kentaro-m/auto-assign-action@v2.0.0
|
|
with:
|
|
configuration-path: ".github/auto-assignees.yml"
|