feat: gitea manifests

This commit is contained in:
ange 2024-08-17 22:58:46 +07:00
parent e1abb674d0
commit c245e46383
Signed by: ange
GPG key ID: 9E0C4157BB7BEB1D
9 changed files with 143 additions and 7 deletions

View file

@ -0,0 +1,24 @@
on: push
jobs:
deploy:
runs-on: debian
steps:
- uses: actions/checkout@v1
- name: setup env
run: |
. ./.env || true
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="$BASE_URL"
REF_NAME="${{ gitea.ref_name }}"
EOF
cat .env
- uses: actions/k8sdeploy@v1
with:
kubeconfig: "${{ secrets.K8S }}"