ci: migrate workflow from items-api to sync and use the actual versio… #6
This file contains hidden or 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: Deploy to Prod | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| docker-build-and-push: | |
| uses: ./.github/workflows/.reusable-docker-build-and-push.yml | |
| deploy-to-prod: | |
| needs: [docker-build-and-push] | |
| runs-on: self-hosted | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Deploy | |
| # Database connection var used in quotes because without them only part of connection string will be used | |
| run: | | |
| helmfile cache cleanup && helmfile apply --suppress-diff --namespace ${{ secrets.INNER_CIRCLE_PROD_NAMESPACE }} -f Api/ci/helmfile.yaml \ | |
| --state-values-set image.tag=sha-${{ github.sha }} \ | |
| --state-values-set ingress.hostname=${{ secrets.INNER_CIRCLE_PROD_HOSTNAME }} \ | |
| --state-values-set extraSecretEnvVars.ConnectionStrings__DefaultConnection="${{ secrets.INNER_CIRCLE_PROD_AUTH_DB_CONNECTION_STRING }}" \ | |
| --state-values-set extraSecretEnvVars.AuthenticationOptions__PublicSigningKey=${{ secrets.INNER_CIRCLE_PROD_PUBLIC_SIGNING_KEY }} \ | |
| --state-values-set extraSecretEnvVars.AuthenticationOptions__PrivateSigningKey=${{ secrets.INNER_CIRCLE_PROD_PRIVATE_SIGNING_KEY }} \ | |
| --state-values-set extraSecretEnvVars.InnerCircleServiceUrls__MailServiceUrl=${{ secrets.INNER_CIRCLE_PROD_MAIL_SERVICE_URL }} \ | |
| --state-values-set extraSecretEnvVars.InnerCircleServiceUrls__AuthUIServiceUrl=${{ secrets.INNER_CIRCLE_PROD_AUTH_UI_SERVICE_URL }} \ | |
| --state-values-set extraSecretEnvVars.InnerCircleServiceUrls__AccountsServiceUrl=${{ secrets.INNER_CIRCLE_PROD_ACCOUNTS_SERVICE_URL }} \ | |
| --state-values-set extraSecretEnvVars.InnerCircleServiceUrls__EmployeesServiceUrl=${{ secrets.INNER_CIRCLE_PROD_EMPLOYEES_SERVICE_URL }} > /dev/null 2>&1 | |
| run-e2e-tests: | |
| uses: ./.github/workflows/.reusable-e2e-tests-against-prod.yml | |
| needs: [deploy-to-prod] | |
| secrets: inherit |