Skip to content

Commit

Permalink
chore: deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
RozmarinUS committed May 28, 2024
1 parent 78ecfad commit 4437785
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/deploy-k8s.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Deploy

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
env:
NAMESPACE: globalart-prod
HARBOR_PROJECT: gitlab-prod
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@v2

- name: Setup kubectl
uses: azure/setup-kubectl@v1

- name: Setup helm
uses: azure/setup-helm@v1

- name: Install and setup werf
run: |
curl -sSL https://werf.io/install.sh | bash -s -- --version 1.2 --channel stable
echo 'source $("$HOME/bin/trdl" use werf "1.2" "stable")' >> $GITHUB_ENV
- name: Deploy
run: |
mkdir -p ~/.kube
echo "${{ secrets.KUBE_CONFIG }}" > ~/.kube/config
source $GITHUB_ENV
werf cr login -u $HARBOR_USERNAME -p $HARBOR_PASSWORD $HARBOR_HOST
werf converge --namespace=$NAMESPACE \
--env prod \
--kube-config=~/.kube/config \
--skip-tls-verify-registry=true \
--repo-container-registry=harbor \
--repo=$HARBOR_HOST/${HARBOR_PROJECT}/$GITHUB_REPOSITORY \
--repo-harbor-username=$HARBOR_USERNAME \
--repo-harbor-password=$HARBOR_PASSWORD \
--atomic=true

0 comments on commit 4437785

Please sign in to comment.