Skip to content

Commit

Permalink
Change deployment target to either of "stg" and "prd"
Browse files Browse the repository at this point in the history
  • Loading branch information
h-holm committed Feb 6, 2025
1 parent 3e73720 commit 960c7f2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,25 @@ jobs:
# Secrets set in a GitHub Environment do not trickle down to re-used workflows as desired. This is a workaround to
# make the required secrets available to the `build-and-push-image` job when calling it from here.
with:
GITHUB_ENVIRONMENT: ${{ startsWith(github.ref, 'refs/tags') && 'prod' || 'dev' }}
GITHUB_ENVIRONMENT: |-
${{ startsWith(github.ref, 'refs/tags') && 'prd'
|| startsWith(github.ref, 'refs/heads/main') && 'prd'
|| 'stg' }}
integration-test:
name: Integration Test
needs: [build-and-push-image]
runs-on: ubuntu-latest

# If this workflow is called from another workflow, use the `GITHUB_ENVIRONMENT` input variable. Otherwise, set the
# GitHub Environment to "dev". This catches PRs that do not have `main` as the target branch.
environment: ${{ inputs.GITHUB_ENVIRONMENT != '' && inputs.GITHUB_ENVIRONMENT || 'dev' }}
# GitHub Environment to "stg". This catches PRs that do not have `main` as the target branch.
environment: ${{ inputs.GITHUB_ENVIRONMENT != '' && inputs.GITHUB_ENVIRONMENT || 'stg' }}
env:
ARTIFACT_REGISTRY_HOSTNAME: "${{ secrets.GCP_LOCATION }}-docker.pkg.dev"
ARTIFACT_REGISTRY_URL: "${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REGISTRY_NAME }}"
CICD_SERVICE_ACCOUNT_EMAIL: "${{ vars.GCP_CICD_SERVICE_ACCOUNT_NAME }}@${{ secrets.GCP_PROJECT_ID }}.iam.gserviceaccount.com"
RUNTIME_SERVICE_ACCOUNT_EMAIL: "${{ secrets.GCP_RUNTIME_SERVICE_ACCOUNT_NAME }}@${{ secrets.GCP_PROJECT_ID }}.iam.gserviceaccount.com"
RUNTIME_SERVICE_ACCOUNT_EMAIL: "${{ vars.GCP_RUNTIME_SERVICE_ACCOUNT_NAME }}@${{ secrets.GCP_PROJECT_ID }}.iam.gserviceaccount.com"

# The `gcp-auth` step requires these permissions to read and pass tokens.
permissions:
Expand Down

0 comments on commit 960c7f2

Please sign in to comment.