Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zavertiaev committed Mar 18, 2024
1 parent 2a832df commit c231ad4
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,50 @@ jobs:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}

deploy-app-slender-stage:
needs: build-image-app
env:
SERVICE_NAME: ${{ vars.APP_NAME }}
NAMESPACE: ${{ vars.NAMESPACE}}-stage
runs-on: 'ubuntu-latest'
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 }}
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 \
-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 \
./

0 comments on commit c231ad4

Please sign in to comment.