feat: gitea manifests
This commit is contained in:
parent
e1abb674d0
commit
c245e46383
9 changed files with 143 additions and 7 deletions
24
.gitea/workflows/deploy.yaml
Normal file
24
.gitea/workflows/deploy.yaml
Normal 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 }}"
|
Loading…
Add table
Add a link
Reference in a new issue