feat: PROD_URL

This commit is contained in:
ange 2024-05-01 12:04:16 +02:00
parent 54c90b1caf
commit 500dda5f17
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D
2 changed files with 10 additions and 4 deletions

3
.env
View File

@ -1,4 +1,5 @@
PROD_URL=matrix.k8s.gmoker.com
IMAGEAPP=ghcr.io/element-hq/synapse:v1.105.0 IMAGEAPP=ghcr.io/element-hq/synapse:v1.105.0
IMAGECOTURN=docker.io/coturn/coturn:4.6.2
TURN_URL=turn.test.gmoker.com TURN_URL=turn.test.gmoker.com
IMAGECOTURN=docker.io/coturn/coturn:4.6.2

View File

@ -1,15 +1,20 @@
on: push on: push
jobs: jobs:
build: deploy:
name: test
runs-on: debian runs-on: debian
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: setup env - name: setup env
run: | 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 cat <<EOF >> .env
BASE_URL="${{ gitea.ref_name }}.$(tr / '\n' <<< "${{ gitea.repository }}" | tac | tr '\n' .)k8s.gmoker.com" BASE_URL="$BASE_URL"
EOF EOF
cat .env cat .env