-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
17ff236
commit 52cf165
Showing
3 changed files
with
59 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
PACK_VERSION: 0.33.2 | ||
|
||
jobs: | ||
publish-buildpack: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: setup-tools | ||
uses: buildpacks/github-actions/[email protected] | ||
- id: setup-pack | ||
uses: buildpacks/github-actions/[email protected] | ||
- name: get buildpack version | ||
id: version | ||
run: | | ||
export VERSION="$(cat playwright/python/buildpack.toml | ./yj -t | jq -rc '.buildpack.version')" | ||
echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
- name: login to ghcr | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | ||
- name: package buildpack | ||
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="${REPO}/$(echo "$BP_ID" | sed 's/\//_/g')" | ||
pack buildpack package --publish ${PACKAGE}:${VERSION} | ||
DIGEST="$(crane digest ${PACKAGE}:${VERSION})" | ||
echo "buildpack_id=$BP_ID" >> "$GITHUB_OUTPUT" | ||
echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
echo "address=${PACKAGE}@${DIGEST}" >> "$GITHUB_OUTPUT" | ||
env: | ||
REPO: ghcr.io/${{ github.repository_owner }} | ||
working-directory: playwright/python | ||
- id: register | ||
uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:5.1.0 | ||
with: | ||
token: ${{ secrets.CNB_PUBLISHER_GHTOKEN }} | ||
id: ${{ steps.package.outputs.buildpack_id }} | ||
version: ${{ steps.package.outputs.version }} | ||
address: ${{ steps.package.outputs.address }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,12 +19,9 @@ jobs: | |
PACKAGE_MANAGER: ${{ matrix.package-manager }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: setup-pack | ||
run: | | ||
curl -sL "https://github.com/buildpacks/pack/releases/download/v$PACK_VERSION/pack-v$PACK_VERSION-linux.tgz" -o pack.tgz | ||
tar -zxf pack.tgz | ||
rm pack.tgz | ||
sudo mv pack /usr/bin/pack | ||
pack --version | ||
- id: setup-tools | ||
uses: buildpacks/github-actions/[email protected] | ||
- id: setup-pack | ||
uses: buildpacks/github-actions/[email protected] | ||
- run: make test | ||
working-directory: playwright/python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# buildpacks | ||
Collection of buildpacks | ||
|
||
ACodeNinja's Collection of cloud native buildpacks. | ||
|
||
- [Playwright Python](./playwright/python) |