Skip to content

Commit

Permalink
feat: also build/push in forks
Browse files Browse the repository at this point in the history
This is needed to test/use the workflow in forks.

Signed-off-by: Jorik Jonker <jorik.jonker@eu.equinix.com>
  • Loading branch information
jonkerj committed Apr 18, 2023
1 parent ebc72b5 commit f0ee52d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/image-push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ jobs:
uses: docker/setup-buildx-action@v1

- name: Login to Container Registry
if: github.repository_owner == 'k8snetworkplumbingwg'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push container image
if: github.repository_owner == 'k8snetworkplumbingwg'
uses: docker/build-push-action@v2
with:
context: .
Expand All @@ -45,11 +43,10 @@ jobs:
uses: docker/setup-buildx-action@v1

- name: Login to Container Registry
if: github.repository_owner == 'k8snetworkplumbingwg'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push container image
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/image-push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ jobs:
uses: docker/setup-buildx-action@v1

- name: Login to Container Registry
if: github.repository_owner == 'k8snetworkplumbingwg'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
Expand All @@ -32,7 +31,6 @@ jobs:
tag-latest: false

- name: Push container image
if: github.repository_owner == 'k8snetworkplumbingwg'
uses: docker/build-push-action@v2
with:
context: .
Expand Down

0 comments on commit f0ee52d

Please sign in to comment.