Skip to content

[luzzle] update pnpm-lock.yaml for catalog adoption #11

[luzzle] update pnpm-lock.yaml for catalog adoption

[luzzle] update pnpm-lock.yaml for catalog adoption #11

Workflow file for this run

name: "@luzzle/web.worker"
on:
push:
branches:
- main
tags:
- 'web.worker/v*'
paths:
- 'packages/web/worker/**'
- 'packages/web/config/**'
- 'pnpm-lock.yaml'
- '.github/workflows/web-worker.yml'
jobs:
check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/web/worker
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: '24'
cache: 'pnpm'
- name: Install dependencies
working-directory: .
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm run lint
- name: Test
run: pnpm run test
- name: Build
run: pnpm run build
build-push:
needs: check
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Check Version
if: github.ref_type == 'tag'
run: |
VERSION_FROM_PKG=$(node -p "require('./packages/web/worker/package.json').version")
TAG_NAME=${GITHUB_REF#refs/tags/}
VERSION_FROM_TAG=${TAG_NAME#web.worker/v}
if [ "$VERSION_FROM_TAG" != "$VERSION_FROM_PKG" ]; then
echo "Version mismatch: Tag version $VERSION_FROM_TAG does not match package.json version $VERSION_FROM_PKG"
exit 1
fi
echo "Version $VERSION_FROM_PKG matches."
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/eleith/luzzle-web-worker
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=match,pattern=web.worker/v(\d+),group=1
type=match,pattern=web.worker/v(\d+\.\d+),group=1
type=match,pattern=web.worker/v(\d+\.\d+\.\d+),group=1
- name: Create dummy npmrc
run: touch .npmrc
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: packages/web/worker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
secrets: |
"npmrc=.npmrc"