Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 33 additions & 18 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
name: Build and Push Docker Image
name: Release

on:
push:
branches:
- main
tags:
- 'v*'

permissions:
contents: read
contents: write
packages: write

jobs:
build-and-push:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -28,24 +26,41 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/kubeorch/ui
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

- name: Build and push
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: |
ghcr.io/kubeorch/ui:latest
ghcr.io/kubeorch/ui:${{ steps.version.outputs.VERSION }}
labels: |
org.opencontainers.image.title=KubeOrch UI
org.opencontainers.image.version=${{ steps.version.outputs.VERSION }}
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
org.opencontainers.image.revision=${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.VERSION }}
name: ${{ steps.version.outputs.VERSION }}
generate_release_notes: true
body: |
## Docker Image

```bash
docker pull ghcr.io/kubeorch/ui:${{ steps.version.outputs.VERSION }}
```

Run with `orchcli`:
```bash
orchcli init && orchcli start -d
```
Loading