Skip to content

Commit

Permalink
Don't run some workflows on forks
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed May 24, 2022
1 parent 980e303 commit 6a01897
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 33 deletions.
17 changes: 0 additions & 17 deletions .github/sync.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/dockerhub-description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ concurrency:
jobs:
dockerHubDescription:
runs-on: ubuntu-20.04
if: ${{ github.event.repository.fork == false }}
steps:
- uses: actions/checkout@v3

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
scan:
name: Fossa
runs-on: ubuntu-20.04
if: ${{ github.event.repository.fork == false }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
on-failure:
runs-on: ubuntu-20.04
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.repository.fork == false }}
steps:
- name: Data
uses: actions/github-script@v6
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
# This job sync this repo to our internal repo
repo-sync:
runs-on: ubuntu-20.04
if: ${{ github.event.repository.fork == false }}
steps:
- name: Repo Sync
uses: wei/git-sync@v3
Expand All @@ -26,21 +27,6 @@ jobs:
destination_branch: "main"
ssh_private_key: ${{ secrets.SYNC_SSH_PRIVATE_KEY }}

# This job open a PR to sync the generated CRD files across to nginx-ingress-operator
# (see .github/sync.yml for config details)
crds-sync:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Run CRD File Sync
uses: BetaHuhn/repo-file-sync-action@v1
with:
GH_PAT: ${{ secrets.NGINX_PAT }}
ASSIGNEES: "nginxinc/kic"
PR_LABELS: chore
COMMIT_EACH_FILE: false

# This job sync the labels across the various repos
labels-sync:
strategy:
Expand All @@ -55,6 +41,7 @@ jobs:
- nginxinc/nginx-asg-sync
- nginxinc/nginx-ns1-gslb
runs-on: ubuntu-20.04
if: ${{ github.event.repository.fork == false }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down

0 comments on commit 6a01897

Please sign in to comment.