Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Making workflows not run on forks. #294

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- name: Go test with coverage
run: sudo make test-coverage # sudo needed for netns change in test

- name: Coveralls
uses: coverallsapp/github-action@v2
with:
Expand All @@ -69,7 +69,7 @@ jobs:

- name: build sriov-cni image
run: podman build -t ghaction-sriov-cni:pr-${{github.event.pull_request.number}} .

- name: Check out sriov operator's code
uses: actions/checkout@v2
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/image-push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ name: "Push images on merge to master"

env:
IMAGE_NAME: ghcr.io/${{ github.repository }}
image-push-owner: 'k8snetworkplumbingwg'

on:
push:
branches:
- master
jobs:
build-and-push-amd64-sriov-cni:
if: ${{ github.repository_owner == env.image-push-owner }}
name: Image Push AMD64
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -37,6 +39,7 @@ jobs:
file: ./Dockerfile

build-and-push-arm64-sriov-cni:
if: ${{ github.repository_owner == env.image-push-owner }}
name: Image Push ARM64
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -67,6 +70,7 @@ jobs:
file: ./Dockerfile.arm64

build-and-push-ppc64le-sriov-cni:
if: ${{ github.repository_owner == env.image-push-owner }}
name: Image Push ppc64le
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -97,6 +101,7 @@ jobs:
file: ./Dockerfile.ppc64le

push-manifest:
if: ${{ github.repository_owner == env.image-push-owner }}
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
5 changes: 5 additions & 0 deletions .github/workflows/image-push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ name: "Push images on release"

env:
IMAGE_NAME: ghcr.io/${{ github.repository }}
image-push-owner: 'k8snetworkplumbingwg'

on:
push:
tags:
- v*
jobs:
build-and-push-amd64-sriov-cni:
if: ${{ github.repository_owner == env.image-push-owner }}
runs-on: ubuntu-20.04
name: Image push AMD64
steps:
Expand Down Expand Up @@ -46,6 +48,7 @@ jobs:
file: ./Dockerfile

build-and-push-arm64-sriov-cni:
if: ${{ github.repository_owner == env.image-push-owner }}
runs-on: ubuntu-20.04
name: Image push ARM64
steps:
Expand Down Expand Up @@ -83,6 +86,7 @@ jobs:
file: ./Dockerfile.arm64

build-and-push-ppc64le-sriov-cni:
if: ${{ github.repository_owner == env.image-push-owner }}
runs-on: ubuntu-20.04
name: Image push ppc64le
steps:
Expand Down Expand Up @@ -120,6 +124,7 @@ jobs:
file: ./Dockerfile.ppc64le

push-manifest:
if: ${{ github.repository_owner == env.image-push-owner }}
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
Loading