Skip to content

Commit

Permalink
Merge branch 'main' into test-manifest
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Bustamante <[email protected]>
  • Loading branch information
jjbustamante authored Sep 20, 2023
2 parents a504b1a + 3a994bd commit 4be0f38
Show file tree
Hide file tree
Showing 143 changed files with 2,686 additions and 556 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Run Go benchmark example
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up go
uses: actions/setup-go@v4
with:
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
git config --global core.symlinks true
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Derive pack version from branch name Unix
if: runner.os != 'Windows'
run: |
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
verbose: true
- name: Prepare Codecov
if: matrix.os == 'windows'
uses: crazy-max/ghaction-chocolatey@v2
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install codecov -y
- name: run Codecov
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up go
uses: actions/setup-go@v4
with:
Expand All @@ -197,7 +197,7 @@ jobs:
needs: build-additional-archs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Derive pack version from branch name
shell: bash
run: |
Expand Down Expand Up @@ -280,8 +280,6 @@ jobs:
prerelease: true
files: pack-v${{ env.PACK_VERSION }}-*
body: |
> This is a **beta** pre-release of the Cloud Native Buildpack local CLI. This platform implementation should be relatively stable and reliable, but breaking changes in the underlying [specification](https://github.com/buildpack/spec) may be implemented without notice.
## Prerequisites
- A container runtime such as [Docker](https://www.docker.com/get-started) or [podman](https://podman.io/getting-started/) must be available to execute builds.
Expand Down Expand Up @@ -350,8 +348,6 @@ jobs:
draft: true
files: pack-v${{ env.PACK_VERSION }}-*
body: |
> This is a **beta** release of the Cloud Native Buildpack local CLI. This platform implementation should be relatively stable and reliable, but breaking changes in the underlying [specification](https://github.com/buildpack/spec) may be implemented without notice.
## Prerequisites
- A container runtime such as [Docker](https://www.docker.com/get-started) or [podman](https://podman.io/getting-started/) must be available to execute builds.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-latest-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
lifecycle_kind: current
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up go
uses: actions/setup-go@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delivery-archlinux-git.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
env:
PACKAGE_NAME: pack-cli-git
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup working dir
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/delivery-archlinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
env:
PACKAGE_NAME: pack-cli
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Determine version
uses: actions/github-script@v6
id: version
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
env:
PACKAGE_NAME: pack-cli-bin
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Determine version
uses: actions/github-script@v6
id: version
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/delivery-chocolatey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
deliver-chocolatey:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Determine version
uses: actions/github-script@v6
id: version
Expand Down Expand Up @@ -67,20 +67,20 @@ jobs:
cp LICENSE $file
cat $file
- name: build-release
uses: crazy-max/ghaction-chocolatey@v2
uses: crazy-max/ghaction-chocolatey@v3
with:
args: pack ${{ env.CHOCO_PATH }}/pack.nuspec --outputdirectory ${{ env.CHOCO_PATH}}
- name: list files
run: |
ls ${{ env.CHOCO_PATH }}
ls ${{ env.CHOCO_PATH }}/tools
- name: Test Release
uses: crazy-max/ghaction-chocolatey@v2
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install pack -s ${{ env.CHOCO_PATH }}/pack.${{ env.PACK_VERSION }}.nupkg
- name: Ensure Pack Installed
run: pack help
- name: Upload Release
uses: crazy-max/ghaction-chocolatey@v2
uses: crazy-max/ghaction-chocolatey@v3
with:
args: push ${{ env.CHOCO_PATH }}/pack.${{ env.PACK_VERSION }}.nupkg -s https://push.chocolatey.org/ -k ${{ secrets.CHOCO_KEY }}
27 changes: 15 additions & 12 deletions .github/workflows/delivery-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ jobs:
return tag.replace(/^v/, '');
- name: Checkout source at tag
uses: actions/checkout@v3
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@v3
uses: actions/checkout@v4
with:
path: ./head
- name: Setup Working Dir
Expand All @@ -55,19 +55,22 @@ jobs:
- name: Determine App Name
run: 'echo "IMG_NAME=${{ env.USERNAME }}/${{ env.IMG_NAME }}" >> $GITHUB_ENV'
- name: Login to Dockerhub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Pack Build/Publish
uses: dfreilich/[email protected]
env:
BP_GO_BUILD_LDFLAGS: "-s -w -X 'github.com/buildpacks/pack.Version=${{ steps.version.outputs.result }}'"
with:
args: 'build ${{ env.IMG_NAME }}:${{ steps.version.outputs.result }} --builder ${{ env.BUILDER }} --env BP_GO_BUILD_LDFLAGS --publish'
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: buildpacks/github-actions/[email protected]
- name: Buildx Build/Publish
run: |
docker buildx build . \
--tag ${{ env.IMG_NAME }}:${{ steps.version.outputs.result }} \
--platform linux/amd64,linux/arm64 \
--build-arg pack_version=${{ steps.version.outputs.result }} \
--provenance=false \
--push
- name: Tag Image as Latest
if: ${{ github.event.release != '' || github.event.inputs.tag_latest }}
run: |
docker pull ${{ env.IMG_NAME }}:${{ steps.version.outputs.result }}
docker tag ${{ env.IMG_NAME }}:${{ steps.version.outputs.result }} ${{ env.IMG_NAME }}:latest
docker push ${{ env.IMG_NAME }}:latest
crane copy ${{ env.IMG_NAME }}:${{ steps.version.outputs.result }} ${{ env.IMG_NAME }}:latest
4 changes: 2 additions & 2 deletions .github/workflows/delivery-homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
update-tap:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Checkout tap
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: buildpack/homebrew-tap
path: homebrew-tap
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/delivery-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [bionic, focal, jammy]
target: [bionic, focal, jammy, lunar]
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Metadata
id: metadata
Expand Down Expand Up @@ -102,3 +102,15 @@ jobs:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
PACKAGE_VERSION: ${{ steps.version.outputs.result }}

- name: Deliver lunar
if: matrix.target == 'lunar'
uses: docker://ubuntu:lunar
with:
entrypoint: .github/workflows/delivery/ubuntu/deliver.sh
env:
DEBIAN_FRONTEND: "noninteractive"
GO_DEP_PACKAGE_NAME: golang
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
PACKAGE_VERSION: ${{ steps.version.outputs.result }}
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM golang:1.20 as builder
ARG pack_version
ENV PACK_VERSION=$pack_version
WORKDIR /app
COPY . .
RUN make build

FROM scratch
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" ]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ install-goimports:
## install-golangci-lint: Install golangci-lint dependency
install-golangci-lint:
@echo "=====> Installing golangci-lint..."
cd tools && $(GOCMD) install github.com/golangci/golangci-lint/cmd/golangci-lint
cd tools && $(GOCMD) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.1

## mod-tidy: Tidy Go modules
mod-tidy:
Expand Down
Loading

0 comments on commit 4be0f38

Please sign in to comment.