13241612fe
All references updated from mirror.soroushasadi.com (https) to mirror.soroushasad.com (http): - .npmrc: registry uses http:// - Dockerfile: syntax frontend + NODE_IMAGE ARG + npm auth line - docker-compose.yml: NODE_IMAGE default - deploy.yml: docker login/logout + NODE_IMAGE env - ci.yml: container image + NODE_IMAGE build-arg + npm auth line Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
39 lines
984 B
YAML
39 lines
984 B
YAML
name: ci
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches-ignore:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: self-hosted
|
|
|
|
env:
|
|
DOCKER_BUILDKIT: 1
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
env:
|
|
TOKEN: ${{ github.token }}
|
|
REF: ${{ github.ref }}
|
|
GIT_SSL_NO_VERIFY: "true"
|
|
run: |
|
|
git init
|
|
git remote remove origin 2>/dev/null || true
|
|
git remote add origin "${{ github.server_url }}/${{ github.repository }}.git"
|
|
git config http.extraheader "Authorization: Bearer ${TOKEN}"
|
|
git fetch --depth=1 origin "${REF}"
|
|
git checkout FETCH_HEAD
|
|
|
|
- name: Docker Build Test
|
|
env:
|
|
NODE_IMAGE: mirror.soroushasad.com/repository/docker-group/node:20-slim
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
run: |
|
|
docker build \
|
|
--build-arg NODE_IMAGE="$NODE_IMAGE" \
|
|
--build-arg NPM_TOKEN="$NPM_TOKEN" \
|
|
-t soroushasadi-site:test . |