ci: publish workflow #8
Workflow file for this run
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
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 }} |