diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml deleted file mode 100644 index d1df6a5..0000000 --- a/.github/workflows/docker-image.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Docker Image CI - -on: - push: - branches: main - pull_request: - branches: main -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - attestations: write - id-token: write - steps: - - name: Build the Docker image - uses: actions/checkout@v4 - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ secrets.PAT_AUTHOR }} - password: ${{ secrets.PAT_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: "latest" - labels: "latest" - - - name: Generate artifact attestation - uses: actions/attest-build-provenance@v1 - with: - subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} - subject-digest: ${{ steps.push.outputs.digest }} - push-to-registry: true diff --git a/Dockerfile b/Dockerfile index 45a1ae7..5936666 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,9 @@ RUN corepack enable COPY . /app WORKDIR /app +# Add the .env file +COPY .env /app/.env + FROM base AS prod-deps RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod