Skip to content

Commit

Permalink
Making workflows not run on forks.
Browse files Browse the repository at this point in the history
Signed-off-by: muhammad adil ghaffar <[email protected]>
  • Loading branch information
adilGhaffarDev committed Mar 11, 2024
1 parent 3e63680 commit fcaa4c9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- cron: "0 8 * * 0" # every sunday
jobs:
build-test:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
strategy:
matrix:
go-version: [1.21.x]
Expand Down Expand Up @@ -36,6 +37,7 @@ jobs:
run: sudo go test -race ./... # sudo needed for netns change in test

coverage:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
runs-on: ubuntu-latest
needs: build-test
name: coverage
Expand All @@ -58,6 +60,7 @@ jobs:
file: test/coverage/lcov.info

sriov-operator-e2e-test:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
name: SR-IOV operator e2e tests
needs: [ build-test ]
runs-on: [ sriov ]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

jobs:
analyze:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
name: Analyze
runs-on: ubuntu-latest
permissions:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/image-push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- master
jobs:
build-and-push-amd64-sriov-cni:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
name: Image Push AMD64
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -37,6 +38,7 @@ jobs:
file: ./Dockerfile

build-and-push-arm64-sriov-cni:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
name: Image Push ARM64
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -67,6 +69,7 @@ jobs:
file: ./Dockerfile.arm64

build-and-push-ppc64le-sriov-cni:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
name: Image Push ppc64le
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -97,6 +100,7 @@ jobs:
file: ./Dockerfile.ppc64le

push-manifest:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
runs-on: ubuntu-20.04
needs: [build-and-push-amd64-sriov-cni,build-and-push-arm64-sriov-cni,build-and-push-ppc64le-sriov-cni]
steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/image-push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- v*
jobs:
build-and-push-amd64-sriov-cni:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
runs-on: ubuntu-20.04
name: Image push AMD64
steps:
Expand Down Expand Up @@ -46,6 +47,7 @@ jobs:
file: ./Dockerfile

build-and-push-arm64-sriov-cni:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
runs-on: ubuntu-20.04
name: Image push ARM64
steps:
Expand Down Expand Up @@ -83,6 +85,7 @@ jobs:
file: ./Dockerfile.arm64

build-and-push-ppc64le-sriov-cni:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
runs-on: ubuntu-20.04
name: Image push ppc64le
steps:
Expand Down Expand Up @@ -120,6 +123,7 @@ jobs:
file: ./Dockerfile.ppc64le

push-manifest:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
runs-on: ubuntu-20.04
needs: [build-and-push-amd64-sriov-cni,build-and-push-arm64-sriov-cni,build-and-push-ppc64le-sriov-cni]
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/static-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Go-static-analysis
on: [push, pull_request]
jobs:
golangci:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
name: Lint
runs-on: ubuntu-latest
steps:
Expand All @@ -13,13 +14,15 @@ jobs:
- name: run make lint
run: make lint
shellcheck:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
hadolint:
if: github.repository == 'k8snetworkplumbingwg/sriov-cni'
runs-on: ubuntu-latest
name: Hadolint
steps:
Expand Down

0 comments on commit fcaa4c9

Please sign in to comment.