improvement: fixed some package.json issues. readme files updated.
This commit is contained in:
@@ -16,6 +16,9 @@
|
||||
# DEPLOY_SECRETS_DIR folder containing database.staging.env + backend.staging.env
|
||||
#
|
||||
# Runner: self-hosted with Docker; Git Bash recommended on Windows (shell: bash).
|
||||
#
|
||||
# We do NOT use gitea.com/actions/checkout — many restricted networks cannot reach gitea.com.
|
||||
# Checkout is a plain `git clone` from the same Gitea host (github.server_url / gitea alias).
|
||||
|
||||
name: Registry — build, push, deploy
|
||||
|
||||
@@ -34,8 +37,23 @@ jobs:
|
||||
outputs:
|
||||
image_tag: ${{ steps.meta.outputs.image_tag }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://gitea.com/actions/checkout@v4
|
||||
- name: Checkout (clone from this Gitea — no gitea.com)
|
||||
run: |
|
||||
set -e
|
||||
SERVER="${{ github.server_url }}"
|
||||
SERVER="${SERVER%/}"
|
||||
REPO="${{ github.repository }}"
|
||||
BRANCH="${{ github.ref_name }}"
|
||||
TOKEN="${{ github.token }}"
|
||||
ACTOR="${{ github.actor }}"
|
||||
HP="${SERVER#http://}"
|
||||
HP="${HP#https://}"
|
||||
if [[ "$SERVER" == https://* ]]; then
|
||||
CLONE_URL="https://${ACTOR}:${TOKEN}@${HP}/${REPO}.git"
|
||||
else
|
||||
CLONE_URL="http://${ACTOR}:${TOKEN}@${HP}/${REPO}.git"
|
||||
fi
|
||||
GIT_TERMINAL_PROMPT=0 git clone --depth 1 --branch "$BRANCH" "$CLONE_URL" .
|
||||
|
||||
- name: Image tag and registry prefix
|
||||
id: meta
|
||||
@@ -77,12 +95,23 @@ jobs:
|
||||
needs: build-and-push
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Checkout infrastructure only
|
||||
uses: https://gitea.com/actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: |
|
||||
infrastructure
|
||||
sparse-checkout-cone-mode: true
|
||||
- name: Checkout (shallow clone from this Gitea — no gitea.com)
|
||||
run: |
|
||||
set -e
|
||||
SERVER="${{ github.server_url }}"
|
||||
SERVER="${SERVER%/}"
|
||||
REPO="${{ github.repository }}"
|
||||
BRANCH="${{ github.ref_name }}"
|
||||
TOKEN="${{ github.token }}"
|
||||
ACTOR="${{ github.actor }}"
|
||||
HP="${SERVER#http://}"
|
||||
HP="${HP#https://}"
|
||||
if [[ "$SERVER" == https://* ]]; then
|
||||
CLONE_URL="https://${ACTOR}:${TOKEN}@${HP}/${REPO}.git"
|
||||
else
|
||||
CLONE_URL="http://${ACTOR}:${TOKEN}@${HP}/${REPO}.git"
|
||||
fi
|
||||
GIT_TERMINAL_PROMPT=0 git clone --depth 1 --branch "$BRANCH" "$CLONE_URL" .
|
||||
|
||||
- name: Write deploy.registry.env and validate secrets path
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user