Compare commits
3 Commits
4775e35b3c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| dc9a980958 | |||
| c40653b2b7 | |||
| f240d32ce6 |
@@ -10,6 +10,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check repository hygiene
|
||||
run: ./scripts/check-repo-hygiene.sh
|
||||
- name: Install Docker CLI
|
||||
run: apt-get update && apt-get install -y docker.io
|
||||
- name: Login to Gitea container registry
|
||||
@@ -24,7 +26,7 @@ jobs:
|
||||
-t git.mapachotes.com/jbourdon/socialize-api:latest \
|
||||
-f backend/src/Socialize.Api/Dockerfile .
|
||||
docker build \
|
||||
--build-arg VITE_API_URL=/api \
|
||||
--build-arg VITE_API_URL=/ \
|
||||
-t git.mapachotes.com/jbourdon/socialize-web:${{ gitea.sha }} \
|
||||
-t git.mapachotes.com/jbourdon/socialize-web:latest \
|
||||
-f frontend/Dockerfile .
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -22,6 +22,10 @@ Thumbs.db
|
||||
# .NET
|
||||
bin/
|
||||
obj/
|
||||
**/[Bb]in/
|
||||
**/[Oo]bj/
|
||||
**/[Bb]in[\\]*
|
||||
**/[Oo]bj[\\]*
|
||||
TestResults/
|
||||
|
||||
# Node
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VITE_API_URL=/api
|
||||
VITE_API_URL=/
|
||||
VITE_STRIPE_API_KEY=51OoveVDrRyqXtNdBAxIo183PujtqFyU0xUMK9YNtIijcHeDlcLN6pqkZWHbgaBA0FHrwLMSoy3yVLN33NX8ExOxL00MSZwgJN7
|
||||
VITE_GOOGLE_CLIENT_ID=213344094492-7c83lqoh7mnjgadpeqo2lcs1krhbsnnd.apps.googleusercontent.com
|
||||
VITE_FACEBOOK_APP_ID=1076433907621883
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
|
||||
ARG VITE_API_URL=/api
|
||||
ARG VITE_API_URL=/
|
||||
ENV VITE_API_URL=$VITE_API_URL
|
||||
|
||||
COPY frontend/package*.json ./
|
||||
@@ -12,3 +12,4 @@ RUN npm run build
|
||||
|
||||
FROM caddy:2-alpine AS runtime
|
||||
COPY --from=build /app/dist /srv
|
||||
COPY deploy/caddy/Caddyfile /etc/caddy/Caddyfile
|
||||
|
||||
25
scripts/check-repo-hygiene.sh
Executable file
25
scripts/check-repo-hygiene.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
failed=0
|
||||
|
||||
tracked_build_outputs="$(git ls-files | grep -E '(^|/)([Bb]in|[Oo]bj)(/|\\)' || true)"
|
||||
if [ -n "$tracked_build_outputs" ]; then
|
||||
printf '%s\n' "Tracked build output paths found:" >&2
|
||||
printf '%s\n' "$tracked_build_outputs" >&2
|
||||
failed=1
|
||||
fi
|
||||
|
||||
tracked_backslash_paths="$(git ls-files | grep '\\' || true)"
|
||||
if [ -n "$tracked_backslash_paths" ]; then
|
||||
printf '%s\n' "Tracked paths containing literal backslashes found:" >&2
|
||||
printf '%s\n' "$tracked_backslash_paths" >&2
|
||||
failed=1
|
||||
fi
|
||||
|
||||
if [ "$failed" -ne 0 ]; then
|
||||
printf '%s\n' "Remove generated files from Git before building." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf '%s\n' "Repository hygiene check passed."
|
||||
Reference in New Issue
Block a user