Build and push - model registry image #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 and push - model registry image | |
| on: | |
| workflow_dispatch: | |
| env: | |
| PROJECT_DIR: "." | |
| jobs: | |
| build-and-push-image: | |
| name: Build and Push container image | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - name: rec-sys-model-registry | |
| context: oc-tools | |
| image-name: rec-sys-model-registry | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Quay.io | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| - name: Set version from last commit hash | |
| id: version | |
| run: | | |
| echo "tag=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
| - name: Build and push ${{ matrix.name }} | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ${{ matrix.context }} | |
| file: Containerfile | |
| push: true | |
| tags: | | |
| quay.io/rh-ai-kickstart/${{ matrix.image-name }}:${{ steps.version.outputs.tag }} | |
| quay.io/rh-ai-kickstart/${{ matrix.image-name }}:latest | |
| build-args: | | |
| IMAGE_TAG=${{ steps.version.outputs.tag }} |