Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pack experimental #1520

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.