From 4cc7d642edfb467bcc25c9cbd15a93b49baf108a Mon Sep 17 00:00:00 2001 From: "Jun Siang Cheah (aider)" Date: Sun, 1 Sep 2024 23:13:21 +0100 Subject: [PATCH] feat: Authenticate with GCP using workload identity federation --- .github/workflows/update-readme.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index 336ab19..7fbd624 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -18,6 +18,12 @@ jobs: - name: Install dependencies run: | pip install -r src/requirements.txt + pip install google-auth + - id: 'auth' + uses: 'google-github-actions/auth@v1' + with: + workload_identity_provider: 'projects/576328904266/locations/global/workloadIdentityPools/github/providers/github-actions' + project_id: ${{ secrets.GCP_PROJECT_ID }} - name: Run script env: GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} @@ -25,6 +31,7 @@ jobs: CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }} HYPERBOLIC_API_KEY: ${{ secrets.HYPERBOLIC_API_KEY }} GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} + GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.auth.outputs.credentials_file_path }} run: | python src/pull_available_models.py - name: Check for changes