feat: PROD_URL

This commit is contained in:
ange 2024-05-01 12:16:38 +02:00
parent a1cae99c41
commit 0d6230cda7
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D
2 changed files with 9 additions and 3 deletions

1
.env
View File

@ -1 +1,2 @@
PROD_URL=chat.gmoker.com
IMAGEAPP=docker.io/vectorim/element-web:v1.11.65

View File

@ -1,15 +1,20 @@
on: push
jobs:
build:
name: test
deploy:
runs-on: debian
steps:
- uses: actions/checkout@v1
- name: setup env
run: |
. ./.env
if [ "${{ gitea.ref_name }}" == prod ] && [ -n "$PROD_URL" ]; then
BASE_URL="$PROD_URL"
else
BASE_URL="${{ gitea.ref_name }}.$(tr / '\n' <<< "${{ gitea.repository }}" | tac | tr '\n' .)k8s.gmoker.com"
fi
cat <<EOF >> .env
BASE_URL="${{ gitea.ref_name }}.$(tr / '\n' <<< "${{ gitea.repository }}" | tac | tr '\n' .)k8s.gmoker.com"
BASE_URL="$BASE_URL"
EOF
cat .env