Skip to content

Commit 99d9c1f

Browse files
committed
feat: add release workflow for building and deploying Kopexa Docs images
1 parent 585b438 commit 99d9c1f

2 files changed

Lines changed: 33 additions & 4 deletions

File tree

.github/workflows/publish.yml renamed to .github/workflows/release-docker-github.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
name: Publish
2+
23
on:
3-
push:
4-
tags:
5-
- 'v*.*.*'
4+
workflow_call:
5+
inputs:
6+
IS_PRERELEASE:
7+
description: "Whether this is a prerelease (affects latest tag)"
8+
required: false
9+
type: boolean
10+
default: false
11+
outputs:
12+
VERSION:
13+
description: release version
14+
value: ${{ jobs.build.outputs.VERSION }}
615

716
env:
817
REGISTRY: ghcr.io
@@ -79,7 +88,7 @@ jobs:
7988
type=semver,pattern={{major}}.{{minor}}
8089
type=semver,pattern={{major}}
8190
# Only tag as 'latest' for stable releases (not prereleases)
82-
type=raw,value=latest,enable=true
91+
type=raw,value=latest,enable=${{ !inputs.IS_PRERELEASE }}
8392
8493
- name: Set up QEMU
8594
uses: docker/setup-qemu-action@v3

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build, release & deploy Kopexa Docs images
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
docker-build:
12+
name: Build & release docker image
13+
permissions:
14+
contents: read
15+
packages: write
16+
id-token: write
17+
uses: ./.github/workflows/release-docker-github.yml
18+
secrets: inherit
19+
with:
20+
IS_PRERELEASE: ${{ github.event.release.prerelease }}

0 commit comments

Comments
 (0)