Skip to content

Commit

Permalink
add stachebox version tags
Browse files Browse the repository at this point in the history
  • Loading branch information
jclausen committed Nov 19, 2023
1 parent b5a1c24 commit fac42cc
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ jobs:
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Setup Environment Variables For Build Process
id: current_version
run: |
box install stachebox --production
echo "VERSION=`cat modules/stachebox/box.json | jq '.version' -r`" >> $GITHUB_ENV
box package set version=@build.version@+@build.number@
# main or snapshot
echo "Github Ref is $GITHUB_REF"
echo "BRANCH=main" >> $GITHUB_ENV
if [ $GITHUB_REF == 'refs/heads/development' ]
then
echo "BRANCH=development" >> $GITHUB_ENV
fi
- name: Setup Builds
id: setup
Expand All @@ -31,10 +44,12 @@ jobs:
elif [[ $GITHUB_REF == 'refs/heads/development' ]]; then
# Snapshot builds
BUILD_IMAGE_TAG=snapshot
VERSION_TAG = snapshot-${{ env.VERSION }}
else
BUILD_IMAGE_TAG=latest
VERSION_TAG=${{ env.VERSION }}
fi
TAGS="${DOCKER_IMAGE}:${BUILD_IMAGE_TAG}"
TAGS="${DOCKER_IMAGE}:${BUILD_IMAGE_TAG},${DOCKER_IMAGE}:${VERSION_TAG}"
# Set output parameters.
echo "IMAGE_TAG=${TAGS}" >> $GITHUB_ENV
Expand Down

0 comments on commit fac42cc

Please sign in to comment.