-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.21 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Deploy
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
env:
NAMESPACE: globalart-prod
HARBOR_PROJECT: github
HARBOR_USERNAME: ${{ secrets.HARBOR_USERNAME }}
HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }}
HARBOR_HOST: ${{ secrets.HARBOR_HOST }}
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Deploy
run: |
mkdir -p $HOME/.kube
cat <<EOF > $HOME/.kube/config
${{ secrets.KUBE_CONFIG }}
EOF
curl -sSL https://werf.io/install.sh | bash -s -- --version 1.2 --channel stable
source $("$HOME/bin/trdl" use werf "1.2" "stable")
werf cr login -u $HARBOR_USERNAME -p $HARBOR_PASSWORD $HARBOR_HOST
werf converge --namespace=$NAMESPACE \
--env prod \
--kube-config=$HOME/.kube/config \
--skip-tls-verify-registry=true \
--repo-container-registry=harbor \
--repo=$HARBOR_HOST/${HARBOR_PROJECT}/nestcord \
--repo-harbor-username=$HARBOR_USERNAME \
--repo-harbor-password=$HARBOR_PASSWORD \
--atomic=true