Skip to content

v1.1.1

v1.1.1 #2

Workflow file for this run

name: Publish to GHCR
on:
release:
types: [created]
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract version info
id: vars
run: |
VERSION=${GITHUB_REF_NAME#v}
MAJOR=$(echo $VERSION | cut -d. -f1)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "MAJOR=$MAJOR" >> $GITHUB_ENV
echo "Detected version: $VERSION (major: $MAJOR)"
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/node-playwright-base-image:${{ env.VERSION }}
ghcr.io/${{ github.repository_owner }}/node-playwright-base-image:${{ env.MAJOR }}
ghcr.io/${{ github.repository_owner }}/node-playwright-base-image:latest