Skip to content

Commit

Permalink
Bump pipeline from 1.20.0 to 1.21.1
Browse files Browse the repository at this point in the history
Bumps pipeline from 1.20.0 to 1.21.1.

Signed-off-by: GitHub <[email protected]>
  • Loading branch information
paketo-bot authored Apr 12, 2022
1 parent e8351f5 commit 1e109d5
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/pipeline-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.20.0
1.21.1
28 changes: 26 additions & 2 deletions .github/workflows/create-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ jobs:
set -euo pipefail
if [ -z "${GITHUB_REF+set}" ]; then
echo "GITHUB_REF set to [${GITHUB_REF-<unset>}], but should never be empty or unset"
exit 255
fi
if [[ ${GITHUB_REF} =~ refs/tags/v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
VERSION=${BASH_REMATCH[1]}
Expand Down Expand Up @@ -140,11 +145,16 @@ jobs:
VERSION: ${{ steps.version.outputs.version }}
- name: Package Buildpack
id: package
run: |
run: |-
#!/usr/bin/env bash
set -euo pipefail
PACKAGE_LIST=($PACKAGES)
# Extract first repo (Docker Hub) as the main to package & register
PACKAGE=${PACKAGE_LIST[0]}
if [[ "${PUBLISH:-x}" == "true" ]]; then
pack buildpack package \
"${PACKAGE}:${VERSION}" \
Expand All @@ -157,14 +167,28 @@ jobs:
fi
crane tag "${PACKAGE}:${VERSION}" latest
echo "::set-output name=digest::$(crane digest "${PACKAGE}:${VERSION}")"
# copy to other repositories specified
for P in "${PACKAGE_LIST[@]}"
do
if [ "$P" != "$PACKAGE" ]; then
crane copy "${PACKAGE}:${VERSION}" "${P}:${VERSION}"
if [[ -n ${VERSION_MINOR:-} && -n ${VERSION_MAJOR:-} ]]; then
crane tag "${P}:${VERSION}" "${VERSION_MINOR}"
crane tag "${P}:${VERSION}" "${VERSION_MAJOR}"
fi
crane tag "${P}:${VERSION}" latest
fi
done
else
pack buildpack package \
"${PACKAGE}:${VERSION}" \
--config "${HOME}"/package.toml \
--format "${FORMAT}"
fi
env:
PACKAGE: gcr.io/paketo-buildpacks/sap-machine
PACKAGES: gcr.io/paketo-buildpacks/sap-machine
PUBLISH: "true"
VERSION: ${{ steps.version.outputs.version }}
VERSION_MAJOR: ${{ steps.version.outputs.version-major }}
Expand Down
28 changes: 26 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ jobs:
set -euo pipefail
if [ -z "${GITHUB_REF+set}" ]; then
echo "GITHUB_REF set to [${GITHUB_REF-<unset>}], but should never be empty or unset"
exit 255
fi
if [[ ${GITHUB_REF} =~ refs/tags/v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
VERSION=${BASH_REMATCH[1]}
Expand Down Expand Up @@ -112,11 +117,16 @@ jobs:
OS: linux
VERSION: ${{ steps.version.outputs.version }}
- name: Package Buildpack
run: |
run: |-
#!/usr/bin/env bash
set -euo pipefail
PACKAGE_LIST=($PACKAGES)
# Extract first repo (Docker Hub) as the main to package & register
PACKAGE=${PACKAGE_LIST[0]}
if [[ "${PUBLISH:-x}" == "true" ]]; then
pack buildpack package \
"${PACKAGE}:${VERSION}" \
Expand All @@ -129,6 +139,20 @@ jobs:
fi
crane tag "${PACKAGE}:${VERSION}" latest
echo "::set-output name=digest::$(crane digest "${PACKAGE}:${VERSION}")"
# copy to other repositories specified
for P in "${PACKAGE_LIST[@]}"
do
if [ "$P" != "$PACKAGE" ]; then
crane copy "${PACKAGE}:${VERSION}" "${P}:${VERSION}"
if [[ -n ${VERSION_MINOR:-} && -n ${VERSION_MAJOR:-} ]]; then
crane tag "${P}:${VERSION}" "${VERSION_MINOR}"
crane tag "${P}:${VERSION}" "${VERSION_MAJOR}"
fi
crane tag "${P}:${VERSION}" latest
fi
done
else
pack buildpack package \
"${PACKAGE}:${VERSION}" \
Expand All @@ -137,7 +161,7 @@ jobs:
fi
env:
FORMAT: image
PACKAGE: test
PACKAGES: test
VERSION: ${{ steps.version.outputs.version }}
unit:
name: Unit Test
Expand Down

0 comments on commit 1e109d5

Please sign in to comment.