Skip to content

Commit

Permalink
Fixes workflow scripts
Browse files Browse the repository at this point in the history
Signed-off-by: adil ghaffar <muhammad.adil.ghaffar@est.tech>
  • Loading branch information
adilGhaffarDev committed May 15, 2024
1 parent 2519961 commit 2db2d7d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/image-push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ env:
image-push-owner: 'k8snetworkplumbingwg'
jobs:
build-and-push-amd64-device-plugin:
if: ${{ github.repository_owner == env.image-push-owner }}
name: Image push AMD64
runs-on: ubuntu-20.04
env:
Expand All @@ -27,6 +26,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push sriov-network-device-plugin
if: ${{ github.repository_owner == env.image-push-owner }}
uses: docker/build-push-action@v4
with:
context: .
Expand All @@ -38,7 +38,6 @@ jobs:
file: images/Dockerfile

build-and-push-arm64-device-plugin:
if: ${{ github.repository_owner == env.image-push-owner }}
name: Image push ARM64
runs-on: ubuntu-20.04
env:
Expand All @@ -61,6 +60,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push sriov-network-device-plugin
if: ${{ github.repository_owner == env.image-push-owner }}
uses: docker/build-push-action@v4
with:
context: .
Expand All @@ -71,7 +71,6 @@ jobs:
file: images/Dockerfile.arm64

build-and-push-ppc64le-device-plugin:
if: ${{ github.repository_owner == env.image-push-owner }}
name: Image push ppc64le
runs-on: ubuntu-20.04
env:
Expand All @@ -94,6 +93,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push sriov-network-device-plugin
if: ${{ github.repository_owner == env.image-push-owner }}
uses: docker/build-push-action@v4
with:
context: .
Expand All @@ -104,7 +104,6 @@ jobs:
file: images/Dockerfile.ppc64le

push-manifest:
if: ${{ github.repository_owner == env.image-push-owner }}
runs-on: ubuntu-20.04
env:
IMAGE_NAME: ghcr.io/${{ github.repository }}
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/image-push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ env:
image-push-owner: 'k8snetworkplumbingwg'
jobs:
build-and-push-amd64-device-plugin:
if: ${{ github.repository_owner == env.image-push-owner }}
name: Image push AMD64
runs-on: ubuntu-20.04
env:
Expand Down Expand Up @@ -37,6 +36,7 @@ jobs:
type=ref,event=tag
- name: Build and push sriov-network-device-plugin
if: ${{ github.repository_owner == env.image-push-owner }}
uses: docker/build-push-action@v4
with:
context: .
Expand All @@ -47,7 +47,6 @@ jobs:
file: images/Dockerfile

build-and-push-arm64-device-plugin:
if: ${{ github.repository_owner == env.image-push-owner }}
name: Image push ARM64
runs-on: ubuntu-20.04
env:
Expand Down Expand Up @@ -81,6 +80,7 @@ jobs:
- name: Build and push sriov-network-device-plugin
if: ${{ github.repository_owner == env.image-push-owner }}
uses: docker/build-push-action@v4
with:
context: .
Expand All @@ -91,7 +91,6 @@ jobs:
file: images/Dockerfile.arm64

build-and-push-ppc64le-device-plugin:
if: ${{ github.repository_owner == env.image-push-owner }}
name: Image push ppc64le
runs-on: ubuntu-20.04
env:
Expand Down Expand Up @@ -124,6 +123,7 @@ jobs:
type=ref,event=tag
- name: Build and push sriov-network-device-plugin
if: ${{ github.repository_owner == env.image-push-owner }}
uses: docker/build-push-action@v4
with:
context: .
Expand All @@ -134,16 +134,17 @@ jobs:
file: images/Dockerfile.ppc64le

push-manifest:
if: ${{ github.repository_owner == env.image-push-owner }}
runs-on: ubuntu-20.04
env:
IMAGE_NAME: ghcr.io/${{ github.repository }}
needs: [build-and-push-amd64-device-plugin,build-and-push-arm64-device-plugin,build-and-push-ppc64le-device-plugin]
steps:
- name: Set up Docker Buildx
if: ${{ github.repository_owner == env.image-push-owner }}
uses: docker/setup-buildx-action@v2

- name: Docker meta
if: ${{ github.repository_owner == env.image-push-owner }}
id: docker_meta
uses: docker/metadata-action@v4
with:
Expand All @@ -154,13 +155,15 @@ jobs:
type=ref,event=tag
- name: Login to GitHub Container Registry
if: ${{ github.repository_owner == env.image-push-owner }}
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Create manifest for multi-arch images
if: ${{ github.repository_owner == env.image-push-owner }}
run: |
docker buildx imagetools create -t ${{ steps.docker_meta.outputs.tags }} \
${{ steps.docker_meta.outputs.tags }}-amd64 \
Expand Down

0 comments on commit 2db2d7d

Please sign in to comment.