Skip to content

Commit

Permalink
add workflow prod stage
Browse files Browse the repository at this point in the history
  • Loading branch information
zavertiaev committed Mar 18, 2024
1 parent 1694745 commit 3c9baa6
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,52 @@ jobs:
method: kubeconfig
kubeconfig: ${{ secrets.KUBECONFIG }}
context: ${{ env.CLUSTER }}
- name: Deploy
run: |
helm upgrade \
-i ${{ env.SERVICE_NAME }} \
-n ${{ env.NAMESPACE }} \
--set nameOverride=${{ env.SERVICE_NAME }} \
--set imagePullSecrets[0].name=${{ vars.GH_SECR }}\
--set image.repository=${{ env.REGISTRY }} \
--set image.name=${{ env.IMAGE_NAME }} \
--set image.tag=${{ needs.build-image-app.outputs.output_tag }} \
--set resources.limits.cpu=${{ env.LIMIT_CPU }} \
--set resources.limits.memory=${{ env.LIMIT_MEMORY }} \
-f extraEnv.yml \
./
deploy-app-slender-prod:
needs: build-image-app
runs-on: 'ubuntu-latest'
env:
SERVICE_NAME: ${{ vars.APP_NAME }}
NAMESPACE: ${{ vars.NAMESPACE}}-prod
steps:
- uses: azure/setup-kubectl@v3
with:
version: 'v1.27.1'
id: install
- uses: azure/setup-helm@v3
with:
version: 'v3.12.0'
- name: 'Clone Helm repository'
uses: actions/checkout@v3
with:
repository: ${{ vars.HELM_REPOSITORY }}
ref: 'main'
token: ${{ secrets.PAT }}
- name: 'Prep extraEnv'
run: |
cat <<EOF > extraEnv.yml
${{ vars.EXTRA_ENV_FILE_PROD }}
EOF
- name: Set Kubernetes Context
uses: azure/k8s-set-context@v3
with:
method: kubeconfig
kubeconfig: ${{ secrets.KUBECONFIG }}
context: ${{ env.CLUSTER }}
- name: Deploy
run: |
helm upgrade \
Expand Down

0 comments on commit 3c9baa6

Please sign in to comment.