Skip to content

Commit

Permalink
fix(build): set correct release tag in release actions
Browse files Browse the repository at this point in the history
Signed-off-by: kmova <[email protected]>
  • Loading branch information
kmova committed Dec 11, 2020
1 parent 7b5ea02 commit 967e120
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ jobs:
CI_TAG="ci"
fi
echo "TAG=${CI_TAG}" >> $GITHUB_ENV
echo "IMAGE_TAG=${CI_TAG}" >> $GITHUB_ENV
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
- name: Print Tag info
run: |
echo "BRANCH: ${BRANCH}"
echo "TAG: ${TAG}"
echo "IMAGE_TAG: ${TAG}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- name: Set Tag
run: |
IMAGE_TAG="${GITHUB_REF#refs/*/v}"
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV
echo "TAG=${IMAGE_TAG}" >> $GITHUB_ENV
echo "RELEASE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV
Expand Down
10 changes: 5 additions & 5 deletions scripts/push
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ function pushBuildx() {
BUILD_TAG="latest"
TARGET_IMG=${DIMAGE}

# TODO Currently ci builds with commit tag will not be generated,
# since buildx does not support multiple repo
# TODO Currently ci builds with commit tag will not be generated,
# since buildx does not support multiple repo
# if not a release build set the tag and ci image
if [ -z "${RELEASE_TAG}" ]; then
return
# BUILD_ID=$(git describe --tags --always)
# BUILD_TAG="${BRANCH}-${BUILD_ID}"
# TARGET_IMG="${DIMAGE}-ci"
#BUILD_ID=$(git describe --tags --always)
#BUILD_TAG="${BRANCH}-${BUILD_ID}"
#TARGET_IMG="${DIMAGE}-ci"
fi

echo "Tagging and pushing ${DIMAGE}:${TAG} as ${TARGET_IMG}:${BUILD_TAG}"
Expand Down

0 comments on commit 967e120

Please sign in to comment.