Skip to content

Commit

Permalink
Disable workflows in forks (#4494)
Browse files Browse the repository at this point in the history
* Prevent devcontainer builds running in forks

* Prevent controller image scanning occuring in forks
  • Loading branch information
theunrepentantgeek authored Dec 9, 2024
1 parent 2edd72e commit f5b74bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-devcontainer-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
packages: write
contents: read

# Only run this scheduled job on the main repo, it can't work elsewhere
if: ${{ github.repository == 'Azure/azure-service-operator' }}

steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pinned to 4.1.7
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/scan-controller-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ on:
jobs:
scan-image:
runs-on: ubuntu-latest

permissions:
packages: read

# Only run this scheduled job on the main repo, it can't work elsewhere
if: ${{ github.repository == 'Azure/azure-service-operator' }}

steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pinned to 4.1.7
Expand Down

0 comments on commit f5b74bc

Please sign in to comment.