diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6a3dbea --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,49 @@ +name: Build Release Container + +on: + push: + branches: + - main + tags: + - "*" + pull_request: + +env: + REGISTRY: quay.io + IMAGE_NAME: yossiovadia/llm-katan + RELEASE_TAG: ${{ github.ref_name }} + +jobs: + containerize: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Login to Quay + if: startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + + - name: Setup Buildx + uses: docker/setup-buildx-action@v3 + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build Container + uses: docker/build-push-action@v6 + with: + push: ${{ startsWith(github.ref, 'refs/tags/') }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + file: Containerfile + provenance: false + cache-from: type=gha + cache-to: type=gha,mode=max + platforms: linux/amd64,linux/arm64