Skip to content

Commit

Permalink
Add product version and build number to config (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
sk81biz authored Feb 19, 2024
1 parent 5520b2e commit 627e61c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,18 @@ jobs:
run: |
cd .${DOCKER_PATH}
if [ "${{ matrix.branch }}" = "develop" ]; then
DOCKER_TAG="develop.${{ github.run_number }}"
PRODUCT_VERSION="develop"
DOCKER_TAG=${PRODUCT_VERSION}.${{ github.run_number }}
else
DOCKER_TAG=$(echo "${{ matrix.branch }}" | sed '/^release\b\|^hotfix\b\|^feature\b/s/release.*\/\|hotfix.*\/\|feature.*\///; s/-git-action$//; s/^v//').${{github.run_number}}
PRODUCT_VERSION=$(echo "${{ matrix.branch }}" | sed '/^release\b\|^hotfix\b\|^feature\b/s/release.*\/\|hotfix.*\/\|feature.*\///; s/-git-action$//; s/^v//')
DOCKER_TAG=${PRODUCT_VERSION}.${{github.run_number}}
fi
export DOCKER_TAG
docker buildx bake -f build.yml \
--set *.args.GIT_BRANCH=${{ matrix.branch }} \
--set *.platform=linux/amd64 \
--set *.args.PRODUCT_VERSION=${PRODUCT_VERSION} \
--set *.args.BUILD_NUMBER=${BUILD_NUMBER} \
--push
echo "version=${DOCKER_TAG}" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit 627e61c

Please sign in to comment.