[CI] Skip documentbot and OWASP dependency check workflows in forks (#13539)
- GitHub Actions workflows might be enabled for a forked repository.
This is useful for running a "personal CI" for apache/pulsar in your
own fork.
- Currently the documentbot workflow job and OWASP dependency
check workflows cause unnecessary errors in forks.
- Disable by default in forks.
diff --git a/.github/workflows/ci-documentbot.yml b/.github/workflows/ci-documentbot.yml
index 564ade6..99c8567 100644
--- a/.github/workflows/ci-documentbot.yml
+++ b/.github/workflows/ci-documentbot.yml
@@ -17,6 +17,7 @@
jobs:
labeling:
+ if: ${{ github.repository == 'apache/pulsar' }}
permissions:
pull-requests: write
runs-on: ubuntu-latest
diff --git a/.github/workflows/ci-owasp-dependency-check.yaml b/.github/workflows/ci-owasp-dependency-check.yaml
index 3476b34..09580c0 100644
--- a/.github/workflows/ci-owasp-dependency-check.yaml
+++ b/.github/workflows/ci-owasp-dependency-check.yaml
@@ -27,6 +27,7 @@
jobs:
run-owasp-dependency-check:
+ if: ${{ github.repository == 'apache/pulsar' }}
name: Run OWASP Dependency Check
runs-on: ubuntu-latest
timeout-minutes: 45
@@ -86,4 +87,4 @@
distribution/server/target/dependency-check-report.html
distribution/offloaders/target/dependency-check-report.html
distribution/io/target/dependency-check-report.html
- pulsar-sql/presto-distribution/target/dependency-check-report.html
\ No newline at end of file
+ pulsar-sql/presto-distribution/target/dependency-check-report.html