-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.34 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
---
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]
- uses: buildpacks/github-actions/[email protected]
- id: extract-package
shell: bash
run: |
BP_ID="$(cat buildpack.toml | yj -t | jq -r .buildpack.id)"
PACKAGE="${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPO }}/$(echo "$BP_ID" | sed 's/\//_/g')"
echo "package=${PACKAGE}" >> $GITHUB_OUTPUT
- run: sed -i.bak -E "s/__replace__/dev/" buildpack.toml
- uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
install-only: true
- run: make build
- run: |
cp dist/build_linux_amd64_v1/build ./bin/build
cp dist/detect_linux_amd64_v1/detect ./bin/detect
- run: |
pack -v \
buildpack \
package \
${{ steps.extract-package.outputs.package }}:dev
- run: |
make setup \
builder=paketobuildpacks/builder:tiny
- run: |
make smoke \
buildpack=${{ steps.extract-package.outputs.package }}:dev