Skip to content

Commit

Permalink
build: Authenticate to Google Cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
usmansaleem committed Mar 8, 2025
1 parent 70ad630 commit b450389
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/ci_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- master
tags:
- '[0-9]+.[0-9]+.[0-9]+(-?.*)'
- '*'
pull_request:
branches:
- master
Expand All @@ -14,6 +14,9 @@ jobs:
build:
# 4 cpu, 16G ram
runs-on: ubuntu-24.04
permissions:
contents: read
id-token: write
environment: dev
outputs:
publish-version: ${{ steps.project-version.outputs.publish-version }}
Expand All @@ -40,6 +43,12 @@ jobs:
image-tag: 'latest'
configuration: LOCALSTACK_DEBUG=1

- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2.1.8
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS_JSON }}
project_id: ${{ secrets.GCP_PROJECT_ID }}

- name: Build and Test
id: build-test
uses: ./.github/actions/build-test
Expand All @@ -57,6 +66,7 @@ jobs:
AZURE_INVALID_KEY_VAULT_NAME: ${{ secrets.AZURE_INVALID_KEY_VAULT_NAME }}
AZURE_KEY_VAULT_NAME: ${{ secrets.AZURE_KEY_VAULT_NAME }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
with:
disable-test: 'false'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

@EnabledIfEnvironmentVariable(
named = "GCP_PROJECT_ID",
matches = ".*",
matches = ".+",
disabledReason = "GCP_PROJECT_ID env variable is required")
@TestInstance(TestInstance.Lifecycle.PER_CLASS) // same instance is shared across test methods
public class GcpSecretManagerAcceptanceTest extends AcceptanceTestBase {
Expand Down

0 comments on commit b450389

Please sign in to comment.