mirror of
https://github.com/invariantlabs-ai/invariant-gateway.git
synced 2026-03-31 00:29:26 +02:00
fig tags in CI
This commit is contained in:
6
.github/workflows/publish-images.yml
vendored
6
.github/workflows/publish-images.yml
vendored
@@ -31,16 +31,14 @@ jobs:
|
||||
id: set-tags
|
||||
run: |
|
||||
if [[ "${{ github.event.workflow_run.head_branch }}" == "main" ]]; then
|
||||
echo "tags=ghcr.io/${{ github.repository }}/app-api:latest" >> $GITHUB_ENV
|
||||
echo "tags_ui=ghcr.io/${{ github.repository }}/app-ui:latest" >> $GITHUB_ENV
|
||||
echo "tags=ghcr.io/${{ github.repository }}/gateway:latest" >> $GITHUB_ENV
|
||||
# starts with v* and only contains numbers and dots
|
||||
elif [[ "${{ github.event.workflow_run.head_branch }}" =~ ^v[0-9.]+$ ]]; then
|
||||
# get tag name from the event
|
||||
version=${{ github.event.workflow_run.head_branch }}
|
||||
# remove the refs/tags/ prefix
|
||||
echo "version string is $version"
|
||||
echo "tags=ghcr.io/${{ github.repository }}/app-api:latest,ghcr.io/${{ github.repository }}/app-api:${version}" >> $GITHUB_ENV
|
||||
echo "tags_ui=ghcr.io/${{ github.repository }}/app-ui:latest,ghcr.io/${{ github.repository }}/app-ui:${version}" >> $GITHUB_ENV
|
||||
echo "tags=ghcr.io/${{ github.repository }}/gateway:latest,ghcr.io/${{ github.repository }}/gateway:${version}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "Failed to determine the tags for the Docker images for branch ${{ github.event.workflow_run.head_branch }}"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user