parent
9ca9ea411b
commit
03ca2e37e5
@ -11,7 +11,7 @@ jobs:
|
||||
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"
|
||||
BASE_URL="${{ gitea.ref_name }}.$(tr / '\n' <<< "${{ gitea.repository }}" | tac | tr '\n' .)k3s.gmoker.com"
|
||||
fi
|
||||
cat <<EOF >> .env
|
||||
BASE_URL="$BASE_URL"
|
||||
@ -20,4 +20,4 @@ jobs:
|
||||
|
||||
- uses: actions/k8sdeploy@v1
|
||||
with:
|
||||
kubeconfig: "${{ secrets.K8S }}"
|
||||
kubeconfig: "${{ secrets.K3S }}"
|
||||
|
2
diff.sh
2
diff.sh
@ -4,4 +4,4 @@ URL='https://raw.githubusercontent.com'
|
||||
REPO='go-gitea/gitea'
|
||||
TAG="release/v$(awk -F: '/^IMAGEAPP/{sub(".[0-9]+-rootless", ""); print $2}' .env)"
|
||||
|
||||
$EDITOR -d -c "wincmd l" -- "$URL/$REPO/$TAG/custom/conf/app.example.ini" config/app.ini
|
||||
$EDITOR -d -- config/app.ini "$URL/$REPO/$TAG/custom/conf/app.example.ini"
|
||||
|
@ -8,11 +8,11 @@ function kapply() {
|
||||
}; export -f kapply
|
||||
|
||||
function kcreatesec() {
|
||||
kubectl create secret generic --save-config --dry-run=client -oyaml "$@" | kubectl apply -f-
|
||||
kubectl create secret generic --dry-run=client -oyaml "$@" | kubectl replace -f-
|
||||
}; export -f kcreatesec
|
||||
|
||||
function kcreatecm() {
|
||||
kubectl create configmap --dry-run=client -oyaml "$@" | kubectl apply -f-
|
||||
kubectl create configmap --dry-run=client -oyaml "$@" | kubectl replace -f-
|
||||
}; export -f kcreatecm
|
||||
|
||||
function kgseckey() {
|
||||
|
@ -7,5 +7,5 @@ export NB_REPLICAS=1
|
||||
. ./manifests/bin/deploy.sh
|
||||
|
||||
if [ "$GITHUB_REF_NAME" = prod ]; then
|
||||
kapply prod/ssh.yaml
|
||||
kapply prod/ports.yaml
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user