From cc4b805e97f3e012f55448e8613b08bd0d23fd6d Mon Sep 17 00:00:00 2001
From: paketo-bot <paketo-bot@users.noreply.github.com>
Date: Mon, 24 Jan 2022 05:17:56 +0000
Subject: [PATCH] Bump pipeline from 1.16.0 to 1.17.0

Bumps pipeline from 1.16.0 to 1.17.0.

Signed-off-by: GitHub <noreply@github.com>
---
 .github/pipeline-version             |  2 +-
 .github/workflows/create-package.yml | 12 ++++++++++++
 .github/workflows/tests.yml          | 10 ++++++++++
 3 files changed, 23 insertions(+), 1 deletion(-)

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 fb193da..76bf294 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/procfile
                 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