-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.42 KB
/
pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
name: pr
on:
pull_request
jobs:
test:
runs-on: ubuntu-latest
env:
DOCKER_REGISTRY: "r.planetary-quantum.com"
DOCKER_REPO: "buildpacks"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: buildpacks/github-actions/[email protected]
- id: package
run: |
#!/usr/bin/env bash
set -euo pipefail
BP_ID="$(cat buildpack.toml | yj -t | jq -r .buildpack.id)"
VERSION="$(cat buildpack.toml | yj -t | jq -r .buildpack.version)"
PACKAGE="${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPO }}/$(echo "$BP_ID" | sed 's/\//_/g')"
echo "::set-output name=package::$PACKAGE"
echo "::set-output name=version::$VERSION"
- uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
install-only: true
- run: make build
- run: |
cp dist/build_linux_amd64/build ./bin/build
cp dist/detect_linux_amd64/detect ./bin/detect
- run: |
pack -v \
buildpack \
package \
${{ steps.package.outputs.package }}:${{ steps.package.outputs.version }}
- run: |
make setup \
builder=paketobuildpacks/builder:tiny
- run: |
make smoke \
buildpack=${{ steps.package.outputs.package }}:${{ steps.package.outputs.version }}