Skip to content

Commit

Permalink
ci: publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
acodeninja committed Mar 18, 2024
1 parent 17ff236 commit 801562f
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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 }}
- name: push buildpack
run: |
docker push ghcr.io/acodeninja/playwright-python:latest
docker push ghcr.io/acodeninja/playwright-python:${{ steps.version.outputs.version }}

0 comments on commit 801562f

Please sign in to comment.