diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml deleted file mode 100644 index 25397b53..00000000 --- a/.github/workflows/docker.yaml +++ /dev/null @@ -1,70 +0,0 @@ -name: docker-publish - -on: - push: - branches: - - main - pull_request: - workflow_dispatch: - -permissions: - contents: read - packages: write - -concurrency: - group: docker-${{ github.ref }} - cancel-in-progress: true - -env: - IMAGE_NAME: pgpm-modules - IMAGE_REGISTRY: ghcr.io - IMAGE_REPO: ${{ github.repository_owner }} - PLATFORMS: ${{ github.event_name != 'pull_request' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} - -jobs: - build-and-push: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up QEMU (enable arm64 emulation) - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to GHCR - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: | - ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }} - tags: | - type=sha,format=short,prefix= - type=ref,event=branch - type=ref,event=pr - type=raw,value=latest,enable={{is_default_branch}} - - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: . - file: ./Dockerfile - push: ${{ github.event_name != 'pull_request' }} - platforms: ${{ env.PLATFORMS }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Image digest - run: echo "Pushed ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }} with tags - ${{ steps.meta.outputs.tags }}" diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 8e77e9e3..00000000 --- a/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -ARG BASE=node -ARG BASE_VERSION=20-bookworm -FROM ${BASE}:${BASE_VERSION} AS build - -LABEL org.opencontainers.image.source="https://github.com/constructive-io/pgpm-modules" -ARG BASE -ARG BASE_VERSION -ENV BASE_VERSION=${BASE_VERSION} - -WORKDIR /app - -# System deps and pnpm (match workspace requirement) -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates curl git; \ - update-ca-certificates || true; \ - npm install -g pnpm@10.12.2; \ - rm -rf /var/lib/apt/lists/* - -# Copy workspace (build context is the repo root of pgpm-modules) -COPY . . - -# Install workspace deps and bundle packages -RUN set -eux; \ - pnpm install --frozen-lockfile; \ - pnpm -r bundle