fix: changing api format for portal logic #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'severity-formula: Build and Deploy to GKE' | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
build-publish-deploy: | |
runs-on: runner-w3 | |
env: | |
SERVICE_NAME: severity-formula | |
steps: | |
- uses: actions/checkout@v2 | |
# Build the Docker image | |
- name: Build and Push | |
run: |- | |
gcloud auth activate-service-account --key-file <(echo '${{ secrets.GCP_CREDENTIALS }}') | |
echo '${{ secrets.GCP_CREDENTIALS }}' | docker login -u _json_key --password-stdin ${{ vars.REGISTRY }} | |
docker build -f Dockerfile -t ${{ vars.REGISTRY }}/${{ env.SERVICE_NAME }}:${{ github.sha }} -t ${{ vars.REGISTRY }}/${{ env.SERVICE_NAME }}:latest . | |
docker push ${{ vars.REGISTRY }}/${{ env.SERVICE_NAME }}:${{ github.sha }} | |
docker push ${{ vars.REGISTRY }}/${{ env.SERVICE_NAME }}:latest | |
# Deploy to the GKE | |
- name: Deploy | |
run: |- | |
gcloud container clusters get-credentials prod --region us-central1 --project hacken-internal-products | |
helm upgrade ${{ env.SERVICE_NAME }} ./helm -n audit-tools --force --install --wait --timeout 15m0s -f ./helm/prod.yaml --set image.repository=${{ vars.REGISTRY }}/${{ env.SERVICE_NAME }} --set image.tag=${{ github.sha }} --debug |