fix: update image prefix setting and normalize repository name in deployment script
This commit is contained in:
@@ -8,7 +8,6 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
IMAGE_PREFIX: ghcr.io/${{ toLower(github.repository) }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -30,6 +29,9 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set image prefix
|
||||||
|
run: echo "IMAGE_PREFIX=ghcr.io/${GITHUB_REPOSITORY,,}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
@@ -90,6 +92,7 @@ jobs:
|
|||||||
script: |
|
script: |
|
||||||
set -e
|
set -e
|
||||||
DEPLOY_PATH="${DEPLOY_PATH:-/opt/ZeaVis-Edu}"
|
DEPLOY_PATH="${DEPLOY_PATH:-/opt/ZeaVis-Edu}"
|
||||||
|
REPO_SLUG="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
|
||||||
if [ ! -d "$DEPLOY_PATH/.git" ]; then
|
if [ ! -d "$DEPLOY_PATH/.git" ]; then
|
||||||
mkdir -p "$DEPLOY_PATH"
|
mkdir -p "$DEPLOY_PATH"
|
||||||
@@ -101,7 +104,7 @@ jobs:
|
|||||||
git pull --ff-only origin main
|
git pull --ff-only origin main
|
||||||
|
|
||||||
cat > .env << 'ENVEOF'
|
cat > .env << 'ENVEOF'
|
||||||
GITHUB_REPOSITORY=${{ toLower(github.repository) }}
|
GITHUB_REPOSITORY=${REPO_SLUG}
|
||||||
DATABASE_URL=${{ secrets.DATABASE_URL }}
|
DATABASE_URL=${{ secrets.DATABASE_URL }}
|
||||||
SESSION_SECRET=${{ secrets.SESSION_SECRET }}
|
SESSION_SECRET=${{ secrets.SESSION_SECRET }}
|
||||||
WEB_APP_URL=https://zeavisedu.asepharyana.tech
|
WEB_APP_URL=https://zeavisedu.asepharyana.tech
|
||||||
|
|||||||
Reference in New Issue
Block a user