Skip to content

Commit

Permalink
Merge pull request #7 from CSR2017/ADMINAPI-346-temp-2
Browse files Browse the repository at this point in the history
Add separate build step and tags for db
  • Loading branch information
CSR2017 authored Jul 24, 2023
2 parents 72b0f4a + 7ad47d1 commit d6868b2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/on-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,17 +270,20 @@ jobs:
if [[ $PACKAGEVERSION =~ "alpha" ]]
then
# Pre-releases get the tag "pre"
TAGS="${{ env.IMAGE_NAME }}:pre"
APITAGS="${{ env.IMAGE_NAME }}:pre"
DBTAGS="${{ env.DATABASE_IMAGE_NAME }}:pre"
else
# Releases get the version, plus shortened form for minor release.
# We are not using shortened form for major or using "latest"
# because they are too imprecise.
MINOR=`echo ${PACKAGEVERSION} | awk -F"." '{print $1"."$2}'`
TAGS="${{ env.IMAGE_NAME }}:${PACKAGEVERSION},${{ env.IMAGE_NAME }}:${MINOR}"
APITAGS="${{ env.IMAGE_NAME }}:${PACKAGEVERSION},${{ env.IMAGE_NAME }}:${MINOR}"
DBTAGS="${{ env.DATABASE_IMAGE_NAME }}:${PACKAGEVERSION},${{ env.DATABASE_IMAGE_NAME }}:${MINOR}"
fi
SEMVERSION=${PACKAGEVERSION:1} # strip off the leading 'v'
echo "TAGS=$TAGS" >> $GITHUB_OUTPUT
echo "APITAGS=$APITAGS" >> $GITHUB_OUTPUT
echo "DBTAGS=$DBTAGS" >> $GITHUB_OUTPUT
# echo "VERSION=$SEMVERSION" >> $GITHUB_OUTPUT
echo "VERSION=0.0.0-alpha.0.67" >> $GITHUB_OUTPUT
Expand All @@ -307,7 +310,7 @@ jobs:
cache-to: type=inline
build-args: VERSION=${{ steps.prepare-tags.outputs.VERSION }}
file: api-pgsql.Dockerfile
tags: ${{ steps.prepare-tags.outputs.TAGS }}
tags: ${{ steps.prepare-tags.outputs.APITAGS }}
labels: ${{ steps.metaapi.outputs.labels }}
push: true

Expand All @@ -325,6 +328,6 @@ jobs:
cache-to: type=inline
build-args: VERSION=${{ steps.prepare-tags.outputs.VERSION }}
file: Dockerfile
tags: ${{ steps.prepare-tags.outputs.TAGS }}
tags: ${{ steps.prepare-tags.outputs.DBTAGS }}
labels: ${{ steps.metadatabase.outputs.labels }}
push: true

0 comments on commit d6868b2

Please sign in to comment.