Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Authenticate to Google Cloud #1069

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 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,13 @@ jobs:
image-tag: 'latest'
configuration: LOCALSTACK_DEBUG=1

- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2.1.8
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
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 +67,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