chore: fix release scripts and steps (#243) #10
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 Profile Controller OCI image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - v*-branch | |
| paths: | |
| - components/profile-controller/** | |
| - releasing/version/VERSION | |
| env: | |
| IMG: ghcr.io/kubeflow/dashboard/profile-controller | |
| ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8 | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| push_to_registry: | |
| name: Build & Push OCI image to GHCR | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - uses: dorny/paths-filter@v4 | |
| id: filter | |
| with: | |
| base: ${{ github.ref }} | |
| filters: | | |
| version: | |
| - 'releasing/version/VERSION' | |
| - name: Login to GHCR | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Build and push multi-architecture OCI image (commit tag) | |
| run: | | |
| cd components/profile-controller | |
| make docker-build-multi-arch | |
| make docker-build-push-multi-arch | |
| - name: Build and push multi-architecture OCI image (latest tag) | |
| if: github.ref == 'refs/heads/main' | |
| run: | | |
| export TAG=latest | |
| cd components/profile-controller | |
| make docker-build-push-multi-arch | |
| - name: Build and push multi-architecture OCI image (version tag) | |
| id: version | |
| if: steps.filter.outputs.version == 'true' | |
| run: | | |
| export TAG=$(cat releasing/version/VERSION) | |
| cd components/profile-controller | |
| make docker-build-push-multi-arch |