Skip to content

ci: publish workflow #8

ci: publish workflow

ci: publish workflow #8

Workflow file for this run

name: publish
on: [push]
env:
PACK_VERSION: 0.33.2
jobs:
push-to-ghcr:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
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
- name: install yj
run: |
curl -sL "https://github.com/sclevine/yj/releases/download/v5.1.0/yj-linux-amd64" -o yj
chmod +x yj
- 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 $ --password-stdin
- name: package buildpack
run: pack buildpack package ghcr.io/acodeninja/playwright-python:latest
working-directory: playwright/python
- name: tag buildpack
run: docker tag ghcr.io/acodeninja/playwright-python:latest ghcr.io/acodeninja/playwright-python:${{ steps.version.outputs.version }}