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
18 changes: 16 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
workflow_dispatch:
inputs:
koel_version:
description: 'Koel release tag to build against (e.g. v9.4.0). Required when triggered manually.'
required: true
type: string

permissions: read-all

Expand Down Expand Up @@ -39,13 +45,21 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Get version from tag
- name: Resolve version
id: version
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
# env-var indirection to prevent template injection from the dispatch input
env:
KOEL_VERSION: ${{ inputs.koel_version }}
run: |
REF="${KOEL_VERSION:-$GITHUB_REF_NAME}"
echo "VERSION=${REF#v}" >> "$GITHUB_OUTPUT"
echo "TAG=${REF}" >> "$GITHUB_OUTPUT"
Comment thread
coderabbitai[bot] marked this conversation as resolved.

- name: Build and push the production image
uses: docker/build-push-action@v7
with:
push: true
tags: phanan/koel:latest,phanan/koel:${{ steps.version.outputs.VERSION }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
build-args: |
KOEL_VERSION_REF=${{ steps.version.outputs.TAG }}
Loading