feat(ci): build custom Docker images for Gitea Actions compatibility
- Create Dockerfile.ci-base with Bun, Node.js, and Playwright pre-installed - Add build-ci-images workflow that triggers on package.json changes - Update PR workflow to use custom ci-base image instead of GitHub Actions - Update Release workflow to use custom ci-base image - Remove dependency on oven/setup-bun@v2 GitHub Action - Remove dependency on docker/setup-buildx-action GitHub Action - Images are automatically built when dependencies in package.json update - Weekly scheduled rebuild ensures tools stay current This resolves the 'authentication required: Repository not found' error when Gitea Actions tries to clone GitHub Actions from external repositories.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# Base CI image with Bun, Node.js, Playwright, and build tools
|
||||
# Used for Gitea Actions CI workflows
|
||||
# Uses Microsoft Playwright image as base (Ubuntu-based) with Bun added
|
||||
|
||||
FROM mcr.microsoft.com/playwright:v1.58.0-jammy AS base
|
||||
|
||||
# Install unzip (required for Bun installation) and other tools
|
||||
RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Bun (latest version)
|
||||
# Note: The playwright image already has Node.js pre-installed
|
||||
RUN curl -fsSL https://bun.sh/install | bash
|
||||
|
||||
# Add Bun to PATH for subsequent commands
|
||||
ENV PATH="/root/.bun/bin:$PATH"
|
||||
|
||||
# Verify installations
|
||||
RUN echo "=== Bun Version ===" && bun --version && \
|
||||
echo "=== Node.js Version ===" && node --version && \
|
||||
echo "=== Playwright Version ===" && bun x playwright --version
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Set default environment variables
|
||||
ENV DATABASE_PROVIDER=sqlite
|
||||
ENV DATABASE_URL=file:./prisma/ci.db
|
||||
ENV BETTER_AUTH_SECRET=test-secret-key-for-ci-only
|
||||
ENV NODE_ENV=test
|
||||
|
||||
# Health check command (can be overridden)
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD bun --version
|
||||
Reference in New Issue
Block a user