Skip to content

Commit

Permalink
Add buildpacksio/pack:<version>-base images to delivery
Browse files Browse the repository at this point in the history
Signed-off-by: Natalie Arellano <[email protected]>
  • Loading branch information
natalieparellano committed Oct 27, 2023
1 parent a2b862c commit 675dca1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/delivery-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,21 @@ on:
default: false

env:
BUILDER: "paketobuildpacks/builder-jammy-tiny"
IMG_NAME: 'pack'
USERNAME: 'buildpacksio'

jobs:
deliver-docker:
strategy:
matrix:
config: [tiny, base]
include:
- config: tiny
base_image: gcr.io/distroless/static
suffix:
- config: base
base_image: ubuntu:jammy
suffix: -base
runs-on: ubuntu-latest
steps:
- name: Determine version
Expand All @@ -42,16 +51,6 @@ jobs:
uses: actions/checkout@v4
with:
ref: v${{ steps.version.outputs.result }}
# This has to come after the first checkout, so it isn't clobbered
- name: Checkout delivery configuration
uses: actions/checkout@v4
with:
path: ./head
- name: Setup Working Dir
shell: bash
run: |
rm project.toml || true
cp head/.github/workflows/delivery/docker/project.toml project.toml
- name: Determine App Name
run: 'echo "IMG_NAME=${{ env.USERNAME }}/${{ env.IMG_NAME }}" >> $GITHUB_ENV'
- name: Login to Dockerhub
Expand All @@ -65,12 +64,13 @@ jobs:
- name: Buildx Build/Publish
run: |
docker buildx build . \
--tag ${{ env.IMG_NAME }}:${{ steps.version.outputs.result }} \
--tag ${{ env.IMG_NAME }}:${{ steps.version.outputs.result }}${{ matrix.suffix }} \
--platform linux/amd64,linux/arm64 \
--build-arg pack_version=${{ steps.version.outputs.result }} \
--build-arg base_image=${{ matrix.base_image }} \
--provenance=false \
--push
- name: Tag Image as Latest
if: ${{ github.event.release != '' || github.event.inputs.tag_latest }}
if: ${{ github.event.release != '' || github.event.inputs.tag_latest }} && ${{ matrix.config != "base" }}
run: |
crane copy ${{ env.IMG_NAME }}:${{ steps.version.outputs.result }} ${{ env.IMG_NAME }}:latest
7 changes: 0 additions & 7 deletions .github/workflows/delivery/docker/project.toml

This file was deleted.

6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ARG base_image=gcr.io/distroless/static

FROM golang:1.20 as builder
ARG pack_version
ENV PACK_VERSION=$pack_version
WORKDIR /app
COPY . .
RUN make build

FROM scratch
FROM ${base_image}
COPY --from=builder /app/out/pack /usr/local/bin/pack
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /tmp /tmp
ENTRYPOINT [ "/usr/local/bin/pack" ]

0 comments on commit 675dca1

Please sign in to comment.