Skip to content

Commit

Permalink
Create GitHub workflow ovs-multiarch-build-and-push.yml for building …
Browse files Browse the repository at this point in the history
…of multi-arch openvswitch image

Restore dynamic caller action
  • Loading branch information
shweta50 committed Sep 14, 2024
1 parent 7ec0b8c commit 95ae5fc
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ovs-multiarch-build-and-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: docker
on:
push:
branches:
- 'master'
- 'v*'
- 'private/**'

jobs:
buildx:
env:
USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
BUILD_ARGS: ""
PLATFORMS: linux/amd64
BRANCH: ${{ github.head_ref || github.ref_name }}
PUSH: true
runs-on: ubuntu-latest
steps:
- name: Set env
run:
echo "TAG=$(echo "${{ env.BRANCH }}" | tr -d /)" >> $GITHUB_ENV

- uses: actions/checkout@v3

- name: Setup Docker BuildX
uses: docker/setup-buildx-action@v1

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

# setup Docker buld action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to the Docker Registry
uses: docker/login-action@v1
with:
username: ${{ env.USERNAME }}
password: ${{ env.PASSWORD }}

- name: Build/Push image to Docker Container Registry
uses: docker/build-push-action@v3
with:
context: hostplumber/pkg/ovs-docker
tags: docker.io/platform9/openvswitch:${{ env.TAG }}
push: ${{ env.PUSH }}
build-args: ${{ env.BUILD_ARGS}}
platforms: ${{ env.PLATFORMS }}

0 comments on commit 95ae5fc

Please sign in to comment.