Compare commits
2 Commits
76e6ced205
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
263169a7f0 | ||
|
|
cb0d381eb0 |
@@ -22,20 +22,8 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Check app
|
||||||
uses: actions/setup-node@v4
|
run: docker build --target ci -t evil-wordle-ci .
|
||||||
with:
|
|
||||||
node-version: '22'
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: npm run lint
|
|
||||||
|
|
||||||
- name: Build app
|
|
||||||
run: npm run build
|
|
||||||
|
|
||||||
- name: Validate compose file
|
- name: Validate compose file
|
||||||
run: docker compose config
|
run: docker compose config
|
||||||
|
|||||||
10
Dockerfile
10
Dockerfile
@@ -1,11 +1,19 @@
|
|||||||
FROM node:22-alpine AS build
|
FROM node:22-alpine AS deps
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
|
|
||||||
|
FROM deps AS ci
|
||||||
|
COPY . .
|
||||||
|
RUN npm run lint
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM deps AS build
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM nginx:1.27-alpine
|
FROM nginx:1.27-alpine
|
||||||
|
RUN sed -i 's#error_log /var/log/nginx/error.log notice;#error_log /var/log/nginx/error.log warn;#' /etc/nginx/nginx.conf
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ The workflow also accepts `REGISTRY_TOKEN` as a fallback for `REGISTRY_PASSWORD`
|
|||||||
|
|
||||||
For organization packages such as `space/evil-wordle`, the username is still the actual Gitea user account for the token, not the organization name. That user needs permission to publish packages under `space`.
|
For organization packages such as `space/evil-wordle`, the username is still the actual Gitea user account for the token, not the organization name. That user needs permission to publish packages under `space`.
|
||||||
|
|
||||||
The workflow uses `catthehacker/ubuntu:act-latest`, Docker Buildx, and links the published package back to the `space/evil-wordle` repository through the Gitea API.
|
The workflow uses `catthehacker/ubuntu:act-latest`, validates the app through the Dockerfile `ci` target, publishes with Docker Buildx, and links the package back to the `space/evil-wordle` repository through the Gitea API.
|
||||||
|
|
||||||
On pushes to `main`, CI publishes:
|
On pushes to `main`, CI publishes:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user