forked from phoenix/litellm-mirror
💚 docker build and push on release
when a github release is published a docker image is pushed to ghcr avoiding manual workflow dispatch method (but still making it available as a fallback)
This commit is contained in:
parent
350389f501
commit
50af89e853
1 changed files with 5 additions and 3 deletions
6
.github/workflows/ghcr_deploy.yml
vendored
6
.github/workflows/ghcr_deploy.yml
vendored
|
@ -1,10 +1,12 @@
|
||||||
#
|
#
|
||||||
name: Build & Publich to GHCR
|
name: Build & Publish to GHCR
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
tag:
|
tag:
|
||||||
description: "The tag version you want to build"
|
description: "The tag version you want to build"
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
# Defines two custom environment variables for the workflow. Used for the Container registry domain, and a name for the Docker image that this workflow builds.
|
# Defines two custom environment variables for the workflow. Used for the Container registry domain, and a name for the Docker image that this workflow builds.
|
||||||
env:
|
env:
|
||||||
|
@ -44,5 +46,5 @@ jobs:
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.tag }} # Add the input tag to the image tags
|
tags: ${{ steps.meta.outputs.tags }}-${{ github.event.inputs.tag || github.event.release.tag_name }} # if a tag is provided, use that, otherwise use the release tag
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue