release: v0.10.0 #26
Workflow file for this run
This file contains 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: Release Build | |
on: | |
push: | |
tags: | |
- '**' | |
workflow_dispatch: | |
jobs: | |
goreleaser: | |
name: kollama - Build for GitHub Releases | |
permissions: | |
contents: write | |
packages: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23' | |
cache: true | |
# Get values for cache paths to be used in later steps | |
- name: Setup Go Cache PATH | |
id: go-cache-paths | |
run: | | |
echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT | |
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT | |
# Cache go build cache, used to speedup go test | |
- name: Go Build Cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.go-cache-paths.outputs.go-build }} | |
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | |
# Cache go mod cache, used to speedup builds | |
- name: Go Mod Cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.go-cache-paths.outputs.go-mod }} | |
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} | |
- name: GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
version: latest | |
args: release --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update new version in krew-index | |
uses: rajatjindal/[email protected] | |
ghcr_build: | |
name: ollama-operator - Build for ghcr.io | |
permissions: | |
packages: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Fetch version | |
id: version | |
run: | | |
export LAST_TAGGED_COMMIT=$(git rev-list --tags --max-count=1) | |
export LAST_TAG=$(git describe --tags $LAST_TAGGED_COMMIT) | |
echo "version=${LAST_TAG#v}" >> $GITHUB_OUTPUT | |
- # Add support for more platforms with QEMU (optional) | |
# https://github.com/docker/setup-qemu-action | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
- name: Sign in to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create image tags | |
id: dockerinfo | |
run: | | |
echo "taglatest=ghcr.io/${{ github.repository }}:latest" >> $GITHUB_OUTPUT | |
echo "tag=ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT | |
- name: Build and Push | |
uses: docker/build-push-action@v6 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
context: ./ | |
file: ./Dockerfile | |
push: true | |
no-cache: false | |
tags: | | |
${{ steps.dockerinfo.outputs.taglatest }} | |
${{ steps.dockerinfo.outputs.tag }} | |
- name: Build installer | |
run: | | |
make build-installer IMG=ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }} | |
- name: Upload installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ollama-operator-installer-${{ steps.version.outputs.version }} | |
path: dist/install.yaml |