Skip to content

Merge pull request #88 from adrianchiris/remove-local-gopath #5

Merge pull request #88 from adrianchiris/remove-local-gopath

Merge pull request #88 from adrianchiris/remove-local-gopath #5

name: "push images on merge to master"
env:
IMAGE_NAME: ghcr.io/${{ github.repository }}
on:
push:
branches:
- master
jobs:
build-and-push-amd64-ib-sriov-cni:
name: image push amd64
runs-on: ubuntu-22.04
steps:
- name: check out the repo
uses: actions/checkout@v3
- name: set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: login to Docker
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and push ib-sriov-cni
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: linux/amd64
tags: |
${{ env.IMAGE_NAME }}:latest-amd64
file: ./Dockerfile
build-and-push-arm64-ib-sriov-cni:
name: image push arm64
runs-on: ubuntu-22.04
steps:
- name: check out the repo
uses: actions/checkout@v3
- name: set up QEMU
uses: docker/setup-qemu-action@v2
- name: set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: login to Docker
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and push ib-sriov-cni
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: linux/arm64
tags: |
${{ env.IMAGE_NAME }}:latest-arm64
file: ./Dockerfile
build-and-push-ppc64le-ib-sriov-cni:
name: image Push ppc64le
runs-on: ubuntu-22.04
steps:
- name: check out the repo
uses: actions/checkout@v3
- name: set up QEMU
uses: docker/setup-qemu-action@v2
- name: set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: login to Docker
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and push ib-sriov-cni
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: linux/ppc64le
tags: |
${{ env.IMAGE_NAME }}:latest-ppc64le
file: ./Dockerfile
push-manifest:
runs-on: ubuntu-22.04
needs: [build-and-push-amd64-ib-sriov-cni,build-and-push-arm64-ib-sriov-cni,build-and-push-ppc64le-ib-sriov-cni]
steps:
- name: set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create manifest for multi-arch images
run: |
docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:latest -t ${{ env.IMAGE_NAME }}:${{ github.sha }} \
${{ env.IMAGE_NAME }}:latest-amd64 \
${{ env.IMAGE_NAME }}:latest-arm64 \
${{ env.IMAGE_NAME }}:latest-ppc64le