diff --git a/.github/pipeline-version b/.github/pipeline-version index 15b989e..092afa1 100644 --- a/.github/pipeline-version +++ b/.github/pipeline-version @@ -1 +1 @@ -1.16.0 +1.17.0 diff --git a/.github/workflows/create-package.yml b/.github/workflows/create-package.yml index 86136e9..1d4380f 100644 --- a/.github/workflows/create-package.yml +++ b/.github/workflows/create-package.yml @@ -93,6 +93,12 @@ jobs: if [[ ${GITHUB_REF} =~ refs/tags/v([0-9]+\.[0-9]+\.[0-9]+) ]]; then VERSION=${BASH_REMATCH[1]} + + MAJOR_VERSION="$(echo "${VERSION}" | awk -F '.' '{print $1 }')" + MINOR_VERSION="$(echo "${VERSION}" | awk -F '.' '{print $1 "." $2 }')" + + echo "::set-output name=version-major::${MAJOR_VERSION}" + echo "::set-output name=version-minor::${MINOR_VERSION}" elif [[ ${GITHUB_REF} =~ refs/heads/(.+) ]]; then VERSION=${BASH_REMATCH[1]} else @@ -141,6 +147,10 @@ jobs: --config "${HOME}"/package.toml \ --publish + if [ ! -z ${VERSION_MINOR} ] && [ ! -z ${VERSION_MAJOR} ]; then + crane tag "${PACKAGE}:${VERSION}" "${VERSION_MINOR}" + crane tag "${PACKAGE}:${VERSION}" "${VERSION_MAJOR}" + fi crane tag "${PACKAGE}:${VERSION}" latest echo "::set-output name=digest::$(crane digest "${PACKAGE}:${VERSION}")" else @@ -153,6 +163,8 @@ jobs: PACKAGE: gcr.io/paketo-buildpacks/microsoft-openjdk PUBLISH: "true" VERSION: ${{ steps.version.outputs.version }} + VERSION_MAJOR: ${{ steps.version.outputs.version-major }} + VERSION_MINOR: ${{ steps.version.outputs.version-minor }} - name: Update release with digest run: | #!/usr/bin/env bash diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8fd9a8d..b6d092a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -67,6 +67,12 @@ jobs: if [[ ${GITHUB_REF} =~ refs/tags/v([0-9]+\.[0-9]+\.[0-9]+) ]]; then VERSION=${BASH_REMATCH[1]} + + MAJOR_VERSION="$(echo "${VERSION}" | awk -F '.' '{print $1 }')" + MINOR_VERSION="$(echo "${VERSION}" | awk -F '.' '{print $1 "." $2 }')" + + echo "::set-output name=version-major::${MAJOR_VERSION}" + echo "::set-output name=version-minor::${MINOR_VERSION}" elif [[ ${GITHUB_REF} =~ refs/heads/(.+) ]]; then VERSION=${BASH_REMATCH[1]} else @@ -114,6 +120,10 @@ jobs: --config "${HOME}"/package.toml \ --publish + if [ ! -z ${VERSION_MINOR} ] && [ ! -z ${VERSION_MAJOR} ]; then + crane tag "${PACKAGE}:${VERSION}" "${VERSION_MINOR}" + crane tag "${PACKAGE}:${VERSION}" "${VERSION_MAJOR}" + fi crane tag "${PACKAGE}:${VERSION}" latest echo "::set-output name=digest::$(crane digest "${PACKAGE}:${VERSION}")" else