ci: Migrate kubeflow/kubeflow poddefaults_oci_publish.yaml GitHub Act… #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Publish PodDefaults OCI image | |
on: | |
push: | |
branches: | |
- main | |
- v*-branch | |
paths: | |
- components/admission-webhook/** | |
- releasing/version/VERSION | |
- .github/workflows/poddefaults_oci_publish.yaml | |
env: | |
IMG: ghcr.io/kubeflow/kubeflow/poddefaults-webhook | |
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8 | |
jobs: | |
push_to_registry: | |
name: Build & Push OCI image to GHCR | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
base: ${{ github.ref }} | |
filters: | | |
version: | |
- 'releasing/version/VERSION' | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push multi-architecture OCI image | |
run: | | |
cd components/admission-webhook | |
ARCH=linux/amd64 make docker-build-multi-arch | |
ARCH=linux/ppc64le make docker-build-multi-arch | |
ARCH=linux/arm64/v8 make docker-build-multi-arch | |
make docker-build-push-multi-arch | |
- name: Build and push latest multi-architecture OCI image | |
if: github.ref == 'refs/heads/main' | |
run: | | |
export TAG=latest | |
cd components/admission-webhook | |
make docker-build-push-multi-arch | |
- name: Build and push multi-architecture OCI image on Version change | |
id: version | |
if: steps.filter.outputs.version == 'true' | |
run: | | |
export TAG=$(cat releasing/version/VERSION) | |
cd components/admission-webhook | |
make docker-build-push-multi-arch |