File tree Expand file tree Collapse file tree 6 files changed +52
-10
lines changed
Expand file tree Collapse file tree 6 files changed +52
-10
lines changed Original file line number Diff line number Diff line change 5151 run : make deploy-linux deploy-wine
5252 - name : Clean up
5353 run : make clean-linux clean-wine
54+ build-deploy-linux-arm64 :
55+ runs-on : ubuntu-latest
56+ steps :
57+ - uses : actions/checkout@v2
58+ - name : Determine download URL for latest pack
59+ id : pack-download-url
60+ uses : actions/github-script@0.4.0
61+ with :
62+ github-token : ${{secrets.GITHUB_TOKEN}}
63+ result-encoding : string
64+ script : |
65+ return github.repos.getLatestRelease({
66+ owner: "buildpacks",
67+ repo: "pack"
68+ }).then(result => {
69+ return result.data.assets
70+ .filter(a => a.name.includes("-linux-arm64.tgz"))
71+ .map(a => a.browser_download_url)[0];
72+ })
73+ - name : Install pack
74+ run : |
75+ curl -s -L -o pack.tgz ${{ steps.pack-download-url.outputs.result }}
76+ tar -xvf pack.tgz
77+ - name : Set config needed for image extensions
78+ run : |
79+ ./pack config experimental true
80+ ./pack config pull-policy always
81+ - name : Build
82+ run : PACK_CMD=./pack make build-linux-stacks
83+ - uses : azure/docker-login@v1
84+ if : (github.event_name == 'repository_dispatch') || (github.event_name == 'push' && github.ref == 'refs/heads/main')
85+ with :
86+ username : cnbs
87+ password : ${{ secrets.REGISTRY_PASSWORD }}
88+ - name : Deploy
89+ if : (github.event_name == 'repository_dispatch') || (github.event_name == 'push' && github.ref == 'refs/heads/main')
90+ run : make deploy-linux
91+ - name : Clean up
92+ run : make clean-linux
5493 build-deploy-windows :
5594 strategy :
5695 matrix :
Original file line number Diff line number Diff line change @@ -18,11 +18,11 @@ build-bionic: build-stack-bionic build-builder-bionic build-buildpacks-bionic
1818
1919build-stack-alpine :
2020 @echo " > Building 'alpine' stack..."
21- bash stacks/build-stack.sh stacks/alpine
21+ bash stacks/build-stack.sh -p $( shell uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) stacks/alpine
2222
2323build-stack-bionic :
2424 @echo " > Building 'bionic' stack..."
25- bash stacks/build-stack.sh stacks/bionic
25+ bash stacks/build-stack.sh -p $( shell uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) stacks/bionic
2626
2727build-linux-builders : build-builder-alpine build-builder-bionic
2828
Original file line number Diff line number Diff line change @@ -16,11 +16,12 @@ if compgen -G "${env_dir}/*" > /dev/null; then
1616fi
1717
1818# 3. INSTALL JAVA
19- jdk_url=" https://cdn.azul.com/zulu/bin/zulu8.40.0.25-ca-jdk8.0.222-linux_x64.tar.gz"
19+ HOST_PLATFORM=$( uname -m | sed s/aarch64/amd64/ | sed s/x86_64/x64/)
20+ jdk_url=" https://cdn.azul.com/zulu/bin/zulu8.40.0.25-ca-jdk8.0.222-linux_${HOST_PLATFORM} .tar.gz"
2021jdk_version=" 1.8.0_222"
2122
2223if [[ -r /etc/alpine-release ]]; then
23- jdk_url=" https://cdn.azul.com/zulu/bin/zulu8.40.0.25-ca-jdk8.0.222-linux_musl_x64 .tar.gz"
24+ jdk_url=" https://cdn.azul.com/zulu/bin/zulu8.40.0.25-ca-jdk8.0.222-linux_musl_ ${HOST_PLATFORM} .tar.gz"
2425 jdk_version=" 1.8.0_222"
2526fi
2627
Original file line number Diff line number Diff line change @@ -16,11 +16,12 @@ if compgen -G "${env_dir}/*" > /dev/null; then
1616fi
1717
1818# 3. INSTALL JAVA
19- jdk_url=" https://cdn.azul.com/zulu/bin/zulu8.40.0.25-ca-jdk8.0.222-linux_x64.tar.gz"
19+ HOST_PLATFORM=$( uname -m | sed s/aarch64/amd64/ | sed s/x86_64/x64/)
20+ jdk_url=" https://cdn.azul.com/zulu/bin/zulu8.40.0.25-ca-jdk8.0.222-linux_${HOST_PLATFORM} .tar.gz"
2021jdk_version=" 1.8.0_222"
2122
2223if [[ -r /etc/alpine-release ]]; then
23- jdk_url=" https://cdn.azul.com/zulu/bin/zulu8.40.0.25-ca-jdk8.0.222-linux_musl_x64 .tar.gz"
24+ jdk_url=" https://cdn.azul.com/zulu/bin/zulu8.40.0.25-ca-jdk8.0.222-linux_musl_ ${HOST_PLATFORM} .tar.gz"
2425 jdk_version=" 1.8.0_222"
2526fi
2627
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ mkdir -p "${ruby_layer_dir}"
1515ruby_version=$( cat " ${plan_path} " | yj -t | jq -r ' .entries[] | select(.name == "ruby") | .version' )
1616
1717echo " ---> Downloading and extracting Ruby ${ruby_version} "
18- ruby_url=https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-18/ruby-${ruby_version} .tgz
18+ HOST_PLATFORM=$( uname -m | sed s/aarch64/amd64/ | sed s/x86_64/x64/)
19+ ruby_url=https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-18/ruby-${ruby_version} -${HOST_PLATFORM} .tgz
1920wget -q -O - " ${ruby_url} " | tar -xzf - -C " ${ruby_layer_dir} "
2021
2122# 3. MAKE RUBY AVAILABLE DURING LAUNCH
Original file line number Diff line number Diff line change @@ -61,14 +61,14 @@ RUN_IMAGE=${REPO_PREFIX}-run:${TAG}
6161BUILD_IMAGE=${REPO_PREFIX} -build:${TAG}
6262
6363if [[ -d " ${IMAGE_DIR} /base" ]]; then
64- docker build --platform=${PLATFORM} -t " ${BASE_IMAGE} " " ${IMAGE_DIR} /base"
64+ docker buildx build --platform=linux/ ${PLATFORM} -t " ${BASE_IMAGE} " " ${IMAGE_DIR} /base"
6565fi
6666
6767echo " BUILDING ${BUILD_IMAGE} ..."
68- docker build --platform=${PLATFORM} --build-arg " base_image=${BASE_IMAGE} " --build-arg " stack_id=${STACK_ID} " -t " ${BUILD_IMAGE} " " ${IMAGE_DIR} /build"
68+ docker buildx build --platform=linux/ ${PLATFORM} --build-arg " base_image=${BASE_IMAGE} " --build-arg " stack_id=${STACK_ID} " -t " ${BUILD_IMAGE} " " ${IMAGE_DIR} /build"
6969
7070echo " BUILDING ${RUN_IMAGE} ..."
71- docker build --platform=${PLATFORM} --build-arg " base_image=${BASE_IMAGE} " --build-arg " stack_id=${STACK_ID} " -t " ${RUN_IMAGE} " " ${IMAGE_DIR} /run"
71+ docker buildx build --platform=linux/ ${PLATFORM} --build-arg " base_image=${BASE_IMAGE} " --build-arg " stack_id=${STACK_ID} " -t " ${RUN_IMAGE} " " ${IMAGE_DIR} /run"
7272
7373echo
7474echo " STACK BUILT!"
You can’t perform that action at this time.
0 commit comments