Merge pull request #6224 from peb-adr/tagging
unique version tag for docker images
This commit is contained in:
commit
cda2c0c21c
11
.github/workflows/build_images.yml
vendored
11
.github/workflows/build_images.yml
vendored
@ -4,6 +4,7 @@ on: [push, workflow_dispatch]
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE_VERSION: 4.0.0-dev
|
IMAGE_VERSION: 4.0.0-dev
|
||||||
|
TAG_SUFFIX: -$(date +%Y%m%d)-${GITHUB_SHA::7}
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Builds Docker images
|
name: Builds Docker images
|
||||||
@ -58,6 +59,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
run: |
|
run: |
|
||||||
|
if [ "${{ matrix.service.name }}" = "openslides-client" ]
|
||||||
|
then
|
||||||
|
eval echo ${IMAGE_VERSION}${TAG_SUFFIX} > src/assets/version.txt
|
||||||
|
fi
|
||||||
if [ "${{ matrix.service.args }}" != "" ]
|
if [ "${{ matrix.service.args }}" != "" ]
|
||||||
then
|
then
|
||||||
export BUILD_ARGS="--build-arg MODULE=${{ matrix.service.args.MODULE }}
|
export BUILD_ARGS="--build-arg MODULE=${{ matrix.service.args.MODULE }}
|
||||||
@ -76,5 +81,7 @@ jobs:
|
|||||||
# Change all uppercase to lowercase
|
# Change all uppercase to lowercase
|
||||||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
||||||
|
|
||||||
docker tag ${{ matrix.service.name }} $IMAGE_ID:$IMAGE_VERSION
|
docker tag ${{ matrix.service.name }} ${IMAGE_ID}:$(eval echo ${IMAGE_VERSION}${TAG_SUFFIX})
|
||||||
docker push $IMAGE_ID:$IMAGE_VERSION
|
docker tag ${{ matrix.service.name }} ${IMAGE_ID}:latest
|
||||||
|
docker push ${IMAGE_ID}:$(eval echo ${IMAGE_VERSION}${TAG_SUFFIX})
|
||||||
|
docker push ${IMAGE_ID}:latest
|
||||||
|
Loading…
Reference in New Issue
Block a user