Skip to content

Commit

Permalink
Use pack experimental
Browse files Browse the repository at this point in the history
* to enable arm64 dual arch
  • Loading branch information
anthonydahanne committed Mar 15, 2024
1 parent 79c5c7e commit ff25384
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
6 changes: 2 additions & 4 deletions octo/create_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,8 @@ func ContributeCreatePackage(descriptor Descriptor) (*Contribution, error) {
},
},
{
Uses: fmt.Sprintf("buildpacks/github-actions/setup-pack@v%s", BuildpackActionsVersion),
With: map[string]interface{}{
"pack-version": PackVersion,
},
Name: "Install pack",
Run: StatikString("/install-experimental-pack.sh"),
},
{
Name: "Enable pack Experimental",
Expand Down
12 changes: 12 additions & 0 deletions octo/install-experimental-pack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# this is coming from a copy of https://github.com/buildpacks/pack/actions/runs/8118576298 stored on box
# TODO to revisit when the official one is out
set -euo pipefail

echo "Installing pack experimental"

mkdir -p "${HOME}"/bin
echo "${HOME}/bin" >> "${GITHUB_PATH}"

curl -L "https://ent.box.com/shared/static/j4d1bfe9uk1sb0i7zjvci0md9xmy41u4" -o ${HOME}/bin/pack
chmod +x "${HOME}"/bin/pack
16 changes: 10 additions & 6 deletions octo/package-buildpack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@

set -euo pipefail

CONFIG="--config "${HOME}"/package.toml"
#TODO with this, we don't need to use the package.toml, because pack exp. does not support it with multi arch yet
if ! [ -f "${PWD}/package.toml" ]; then
cd ~/buildpack
CONFIG=""
fi

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}" \
--config "${HOME}"/package.toml \
pack -v buildpack package \
"${PACKAGE}:${VERSION}" "${CONFIG}" \
--publish

if [[ -n ${VERSION_MINOR:-} && -n ${VERSION_MAJOR:-} ]]; then
Expand All @@ -34,8 +39,7 @@ if [[ "${PUBLISH:-x}" == "true" ]]; then
done

else
pack buildpack package \
"${PACKAGE}:${VERSION}" \
--config "${HOME}"/package.toml \
pack -v buildpack package \
"${PACKAGE}:${VERSION}" "${CONFIG}" \
--format "${FORMAT}"
fi
2 changes: 1 addition & 1 deletion octo/statik/statik.go

Large diffs are not rendered by default.

0 comments on commit ff25384

Please sign in to comment.