Skip to content

Merge pull request #7 from chayprabs/dependabot/npm_and_yarn/types/no… #39

Merge pull request #7 from chayprabs/dependabot/npm_and_yarn/types/no…

Merge pull request #7 from chayprabs/dependabot/npm_and_yarn/types/no… #39

Workflow file for this run

name: Publish Worker Image
on:
push:
branches:
- main
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
permissions:
contents: read
packages: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.33.1
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile=false
- name: Build worker image for smoke check
uses: docker/build-push-action@v6
with:
context: .
file: apps/worker/Dockerfile
load: true
push: false
tags: csvshape-worker:smoke
- name: Boot worker container
run: |
docker run -d --rm --name csvshape-worker-smoke -p 8797:8797 csvshape-worker:smoke
- name: Verify worker health
env:
CSVSHAPE_WORKER_HEALTH_OUT: docs/qc/benchmarks/worker-health-ci.json
run: node apps/worker/scripts/check-health.mjs
- name: Upload worker health artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: csvshape-worker-health
path: docs/qc/benchmarks/worker-health-ci.json
- name: Show worker logs on failure
if: failure()
run: docker logs csvshape-worker-smoke
- name: Stop worker container
if: always()
run: docker stop csvshape-worker-smoke || true
- id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/csvshape-worker
tags: |
type=ref,event=branch
type=sha,prefix=sha-
type=raw,value=latest,enable={{is_default_branch}}
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v6
with:
context: .
file: apps/worker/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: ${{ steps.meta.outputs.tags }}