mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Update tagging of the docker image on release, push to master & PR
- Tag docker image with `tag_name' on release (i.e tag push) - Else tag with 'pre' on push to master - Else tag with 'dev' on push to PR branch - Only tag the latest release with release tag Previously the latest commit on master was being tagged with the latest tag. This doesn't sync with the release cadence of the rest of Khoj
This commit is contained in:
7
.github/workflows/dockerize.yml
vendored
7
.github/workflows/dockerize.yml
vendored
@@ -16,7 +16,8 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
DOCKER_IMAGE_TAG: ${{ github.ref == 'refs/heads/master' && 'latest' || github.ref_name }}
|
||||
# Tag Image with tag name on release, else with 'pre' if push to master
|
||||
DOCKER_IMAGE_TAG: ${{ github.ref_type == 'tag' && github.ref_name || 'pre' }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -47,7 +48,9 @@ jobs:
|
||||
file: Dockerfile
|
||||
platforms: linux/amd64, linux/arm64
|
||||
push: true
|
||||
tags: ghcr.io/${{ github.repository }}:${{ env.DOCKER_IMAGE_TAG }}
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}:${{ env.DOCKER_IMAGE_TAG }}
|
||||
${{ github.ref_type == 'tag' && 'ghcr.io/${{ github.repository }}-cloud:latest' || '' }}
|
||||
build-args: |
|
||||
VERSION=${{ steps.hatch.outputs.version }}
|
||||
PORT=42110
|
||||
|
||||
Reference in New Issue
Block a user