Compare commits

...

4 Commits

Author SHA1 Message Date
Max Brenner
4e461dadb1 enable docker push commands 2021-03-02 16:57:56 +01:00
Max Brenner
763485a26a adjust build for release branch 2021-03-02 16:51:39 +01:00
AkshayJagadish-ne
75ac653569 Merge pull request #20 from Telecominfraproject/WIFI-1669
WIFI-1669 TIP 1.0 Update default container image tags in rel 1.0
2021-02-27 22:01:59 -05:00
Akshay Jagadish
edea4dc1cd WIFI-1669 TIP 1.0 Update default container image tags in release 1.0 branch 2021-02-26 19:22:41 -05:00

View File

@@ -5,6 +5,7 @@ on:
# Publish `master` as Docker `latest` image.
branches:
- master
- 'release/**'
# Publish `v1.2.3` tags as releases.
tags:
@@ -58,8 +59,11 @@ jobs:
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Create a release snapshot if we are on release branch
[[ "${{ github.ref }}" == "refs/heads/release/"* ]] && VERSION=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\/release\/[v]//' | awk '{print $1"-SNAPSHOT"}')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=0.0.1-SNAPSHOT
[ "$VERSION" == "master" ] && VERSION=1.0.0-SNAPSHOT
TIMESTAMP=$(date +'%Y-%m-%d')
echo date=$TIMESTAMP > commit.properties
@@ -89,8 +93,11 @@ jobs:
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Create a release snapshot if we are on release branch
[[ "${{ github.ref }}" == "refs/heads/release/"* ]] && VERSION=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\/release\/[v]//' | awk '{print $1"-SNAPSHOT"}')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=0.0.1-SNAPSHOT
[ "$VERSION" == "master" ] && VERSION=1.0.0-SNAPSHOT
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
@@ -100,4 +107,4 @@ jobs:
docker push $IMAGE_ID:$VERSION
docker tag image $IMAGE_ID:$VERSION-$TIMESTAMP
docker push $IMAGE_ID:$VERSION-$TIMESTAMP
docker push $IMAGE_ID:$VERSION-$TIMESTAMP