On version 0.8.1, authentification is successful, but gloud is not authenticated in the next step. Works on version 0.8.0 and version 0.7.3
gloud info output:
Current Properties:
[core]
account: [[email protected]] (property file)
project: [project-b] (environment)
gloud info output:
Current Properties:
[core]
account: None
project: None
name: cluster-destroy
on: [workflow_dispatch]
jobs:
cluster-destroy:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: "google auth"
id: "auth"
uses: 'google-github-actions/[email protected]'
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_ADMIN }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: "Set up Cloud SDK"
uses: "google-github-actions/[email protected]"
- run : gcloud info
Hi there @komondor
Thank you for opening an issue. Our team will triage this as soon as we can. Please take a moment to review the troubleshooting steps which lists common error messages and their resolution steps.
Hi @komondor
I am unable to reproduce this issue. With the following action.yml:
name: 'repro'
on:
push:
branches:
- 'main'
jobs:
sake:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: 'actions/[email protected]'
- id: 'auth'
uses: 'google-github-actions/[email protected]'
with:
credentials_json: '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}'
project_id: 'sv-actions-test'
- uses: 'google-github-actions/[email protected]'
- run: 'gcloud info'
gcloud is authenticated correctly:
Installation Properties: [/opt/hostedtoolcache/gcloud/401.0.0/x64/properties]
User Config Directory: [/home/runner/.config/gcloud]
Active Configuration Name: [default]
Active Configuration Path: [/home/runner/.config/gcloud/configurations/config_default]
Account: [[email protected]]
Project: [sv-actions-test]
Current Properties:
[auth]
credential_file_override: [/home/runner/work/ghactions-test/ghactions-test/gha-creds-6224ee7549631a8b.json] (environment)
[core]
account: [[email protected]] (property file)
disable_usage_reporting: [True] (property file)
project: [sv-actions-test] (environment)
[metrics]
environment: [github-actions-setup-gcloud] (environment)
Logs Directory: [/home/runner/.config/gcloud/logs]
Last Log File: [/home/runner/.config/gcloud/logs/2022.09.09/13.[45](https://github.com/sethvargo-demos/ghactions-test/runs/8271394912?check_suite_focus=true#step:5:46).42.996[58](https://github.com/sethvargo-demos/ghactions-test/runs/8271394912?check_suite_focus=true#step:5:59)3.log]
It reproduces at my place as well. Exactly the same action, but with version 0.8.0 (google-github-actions/[email protected]
) works fine. Perhaps the problem is due to running Github Action locally with act
Action:
name: REDACTED
on:
workflow_dispatch:
jobs:
REDACTED:
name: REDACTED
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 14.x
- name: Authorize to Google Cloud
uses: google-github-actions/[email protected]
with:
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS_PROD }}
- name: Set up Cloud SDK
uses: google-github-actions/[email protected]
- run: gcloud info
Output:
~/D/P/ β―β―β― act -j REDACTED -s GOOGLE_CREDENTIALS_PROD=$GOOGLE_CREDENTIALS_PROD -s PAT=$NPM_TOKEN --container-architecture linux/amd64
π Start image=ghcr.io/catthehacker/ubuntu:act-latest
π³ docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform=linux/amd64 username= forcePull=false
π³ docker create image=ghcr.io/catthehacker/ubuntu:act-latest platform=linux/amd64 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
π³ docker run image=ghcr.io/catthehacker/ubuntu:act-latest platform=linux/amd64 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
π³ docker exec cmd=[chown -R 0:0 /Users/REDACTED/Documents/Projects/REDACTED] user=0 workdir=
β git clone 'https://github.com/actions/setup-node' # ref=v2
β git clone 'https://github.com/google-github-actions/auth' # ref=v0
β git clone 'https://github.com/google-github-actions/setup-gcloud' # ref=v0
β Run Main Checkout repository
π³ docker cp src=/Users/REDACTED/Documents/Projects/REDACTED/. dst=/Users/REDACTED/Documents/Projects/REDACTED
close /var/folders/7y/6ztkfp_j561fqfmxk2c5hscm0000gn/T/act626317871: file already closed
π³ docker exec cmd=[chown -R 0:0 /Users/REDACTED/Documents/Projects/REDACTED] user=0 workdir=
β
Success - Main Checkout repository
β Run Main Setup Node
π³ docker cp src=/Users/REDACTED/.cache/act/[email protected]/ dst=/var/run/act/actions/[email protected]/
close /var/folders/7y/6ztkfp_j561fqfmxk2c5hscm0000gn/T/act2547225108: file already closed
π³ docker exec cmd=[chown -R 0:0 /var/run/act/actions/[email protected]/] user=0 workdir=
π³ docker exec cmd=[node /var/run/act/actions/[email protected]/dist/setup/index.js] user= workdir=
π¬ ::debug::isExplicit:
π¬ ::debug::explicit? false
π¬ ::debug::isExplicit: 12.22.12
π¬ ::debug::explicit? true
π¬ ::debug::isExplicit: 16.17.0
π¬ ::debug::explicit? true
π¬ ::debug::evaluating 0 versions
π¬ ::debug::match not found
| Attempting to download 14.x...
π¬ ::debug::No manifest cached
π¬ ::debug::Getting manifest from actions/[email protected]
π¬ ::debug::check 18.9.0 satisfies 14.x
π¬ ::debug::check 18.8.0 satisfies 14.x
π¬ ::debug::check 18.7.0 satisfies 14.x
π¬ ::debug::check 18.6.0 satisfies 14.x
π¬ ::debug::check 18.5.0 satisfies 14.x
π¬ ::debug::check 18.4.0 satisfies 14.x
π¬ ::debug::check 18.3.0 satisfies 14.x
π¬ ::debug::check 18.2.0 satisfies 14.x
π¬ ::debug::check 18.1.0 satisfies 14.x
π¬ ::debug::check 18.0.0 satisfies 14.x
π¬ ::debug::check 16.17.0 satisfies 14.x
π¬ ::debug::check 16.16.0 satisfies 14.x
π¬ ::debug::check 16.15.1 satisfies 14.x
π¬ ::debug::check 16.15.0 satisfies 14.x
π¬ ::debug::check 16.14.2 satisfies 14.x
π¬ ::debug::check 16.14.1 satisfies 14.x
π¬ ::debug::check 16.14.0 satisfies 14.x
π¬ ::debug::check 16.13.2 satisfies 14.x
π¬ ::debug::check 16.13.1 satisfies 14.x
π¬ ::debug::check 16.13.0 satisfies 14.x
π¬ ::debug::check 16.12.0 satisfies 14.x
π¬ ::debug::check 16.11.1 satisfies 14.x
π¬ ::debug::check 16.11.0 satisfies 14.x
π¬ ::debug::check 16.10.0 satisfies 14.x
π¬ ::debug::check 16.9.1 satisfies 14.x
π¬ ::debug::check 16.9.0 satisfies 14.x
π¬ ::debug::check 16.8.0 satisfies 14.x
π¬ ::debug::check 16.7.0 satisfies 14.x
π¬ ::debug::check 16.6.2 satisfies 14.x
π¬ ::debug::check 16.6.1 satisfies 14.x
π¬ ::debug::check 16.6.0 satisfies 14.x
π¬ ::debug::check 16.5.0 satisfies 14.x
π¬ ::debug::check 16.4.2 satisfies 14.x
π¬ ::debug::check 16.4.1 satisfies 14.x
π¬ ::debug::check 16.4.0 satisfies 14.x
π¬ ::debug::check 16.3.0 satisfies 14.x
π¬ ::debug::check 16.2.0 satisfies 14.x
π¬ ::debug::check 16.1.0 satisfies 14.x
π¬ ::debug::check 16.0.0 satisfies 14.x
π¬ ::debug::check 14.20.0 satisfies 14.x
π¬ ::debug::x64===x64 && darwin===linux
π¬ ::debug::x64===x64 && linux===linux
π¬ ::debug::matched 14.20.0
| Acquiring 14.20.0 - x64 from https://github.com/actions/node-versions/releases/download/14.20.0-2633808318/node-14.20.0-linux-x64.tar.gz
π¬ ::debug::Downloading https://github.com/actions/node-versions/releases/download/14.20.0-2633808318/node-14.20.0-linux-x64.tar.gz
π¬ ::debug::Destination /tmp/6a3187fb-5c02-42a5-93a0-cc5dc11000f9
π¬ ::debug::download complete
| Extracting ...
π¬ ::debug::Checking tar --version
π¬ ::debug::tar (GNU tar) 1.30%0ACopyright (C) 2017 Free Software Foundation, Inc.%0ALicense GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.%0AThis is free software: you are free to change and redistribute it.%0AThere is NO WARRANTY, to the extent permitted by law.%0A%0AWritten by John Gilmore and Jay Fenlason.
| [command]/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword -C /tmp/d9a30e0b-4d54-4c01-a4ee-f7cb7c4ddad8 -f /tmp/6a3187fb-5c02-42a5-93a0-cc5dc11000f9
| Adding to the cache ...
π¬ ::debug::Caching tool node 14.20.0 x64
π¬ ::debug::source dir: /tmp/d9a30e0b-4d54-4c01-a4ee-f7cb7c4ddad8
π¬ ::debug::destination /opt/hostedtoolcache/node/14.20.0/x64
π¬ ::debug::finished caching tool
| Done
β ##[add-matcher]/run/act/actions/[email protected]/.github/tsc.json
β ##[add-matcher]/run/act/actions/[email protected]/.github/eslint-stylish.json
β ##[add-matcher]/run/act/actions/[email protected]/.github/eslint-compact.json
β
Success - Main Setup Node
β Run Main Authorize to Google Cloud
π³ docker cp src=/Users/REDACTED/.cache/act/[email protected]/ dst=/var/run/act/actions/[email protected]/
close /var/folders/7y/6ztkfp_j561fqfmxk2c5hscm0000gn/T/act1356152969: file already closed
π³ docker exec cmd=[chown -R 0:0 /var/run/act/actions/[email protected]/] user=0 workdir=
π³ docker exec cmd=[node /var/run/act/actions/[email protected]/dist/main/index.js] user= workdir=
π¬ ::debug::Using credentials JSON
π¬ ::debug::Creating credentials file
| Created credentials file at "/Users/REDACTED/Documents/Projects/REDACTED/gha-creds-e6ad813763684c62.json"
|
β ::set-output:: credentials_file_path=/Users/REDACTED/Documents/Projects/REDACTED/gha-creds-e6ad813763684c62.json
|
β ::set-output:: project_id=REDACTED-prod <-- correct project id from service account json
β
Success - Main Authorize to Google Cloud
β Run Main Set up Cloud SDK
π³ docker cp src=/Users/REDACTED/.cache/act/[email protected]/ dst=/var/run/act/actions/[email protected]/
close /var/folders/7y/6ztkfp_j561fqfmxk2c5hscm0000gn/T/act369210216: file already closed
π³ docker exec cmd=[chown -R 0:0 /var/run/act/actions/[email protected]/] user=0 workdir=
π³ docker exec cmd=[node /var/run/act/actions/[email protected]/dist/main/index.js] user= workdir=
π¬ ::debug::isExplicit: 401.0.0
π¬ ::debug::explicit? true
π¬ ::debug::checking cache: /opt/hostedtoolcache/gcloud/401.0.0/x64
π¬ ::debug::not found
π¬ ::debug::Downloading https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-401.0.0-linux-x86_64.tar.gz
π¬ ::debug::Destination /tmp/e2ed0932-2ee4-4b9e-86d8-ad325b0286a9
π¬ ::debug::download complete
π¬ ::debug::Checking tar --version
π¬ ::debug::tar (GNU tar) 1.30%0ACopyright (C) 2017 Free Software Foundation, Inc.%0ALicense GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.%0AThis is free software: you are free to change and redistribute it.%0AThere is NO WARRANTY, to the extent permitted by law.%0A%0AWritten by John Gilmore and Jay Fenlason.
| [command]/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /tmp/dbe0c157-39e5-44ac-80b1-0151c3571722 -f /tmp/e2ed0932-2ee4-4b9e-86d8-ad325b0286a9
π¬ ::debug::Caching tool gcloud 401.0.0 x64
π¬ ::debug::source dir: /tmp/dbe0c157-39e5-44ac-80b1-0151c3571722/google-cloud-sdk
π¬ ::debug::destination /opt/hostedtoolcache/gcloud/401.0.0/x64
π¬ ::debug::finished caching tool
| No credentials detected, skipping authentication
β
Success - Main Set up Cloud SDK
β Run Main gcloud info
π³ docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/4] user= workdir=
| Google Cloud SDK [401.0.0]
|
| Platform: [Linux, x86_64] uname_result(system='Linux', node='docker-desktop', release='5.10.76-linuxkit', version='#1 SMP PREEMPT Mon Nov 8 11:22:26 UTC 2021', machine='x86_64', processor='x86_64')
| Locale: ('en_US', 'UTF-8')
| Python Version: [3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]]
| Python Location: [/usr/bin/python3]
| OpenSSL: [OpenSSL 1.1.1f 31 Mar 2020]
| Requests Version: [2.22.0]
| urllib3 Version: [1.25.9]
| Site Packages: [Disabled]
|
| Installation Root: [/opt/hostedtoolcache/gcloud/401.0.0/x64]
| Installed Components:
| bq: [2.0.75]
| core: [2022.09.03]
| gcloud-crc32c: [1.0.0]
| gsutil: [5.12]
| System PATH: [/opt/hostedtoolcache/gcloud/401.0.0/x64/bin:/opt/hostedtoolcache/node/14.20.0/x64/bin:/opt/hostedtoolcache/node/16.17.0/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin]
| Python PATH: [/opt/hostedtoolcache/gcloud/401.0.0/x64/lib/third_party:/opt/hostedtoolcache/gcloud/401.0.0/x64/lib:/usr/lib/python38.zip:/usr/lib/python3.8:/usr/lib/python3.8/lib-dynload]
| Cloud SDK on PATH: [True]
| Kubectl on PATH: [False]
|
| Installation Properties: [/opt/hostedtoolcache/gcloud/401.0.0/x64/properties]
| User Config Directory: [/root/.config/gcloud]
| Active Configuration Name: [default]
| Active Configuration Path: [/root/.config/gcloud/configurations/config_default]
|
| Account: [None]
| Project: [None]
|
| Current Properties:
| [core]
| disable_usage_reporting: [True] (property file)
| [metrics]
| environment: [github-actions-setup-gcloud] (environment)
|
| Logs Directory: [/root/.config/gcloud/logs]
| Last Log File: [None]
|
| git: [git version 2.37.3]
| ssh: [OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f 31 Mar 2020]
|
|
β
Success - Main gcloud info
β Run Post Set up Cloud SDK
π³ docker exec cmd=[node /var/run/act/actions/[email protected]/dist/post/index.js] user= workdir=
| Skipping credential cleanup - "export_default_credentials" is false.
β
Success - Post Set up Cloud SDK
β Run Post Authorize to Google Cloud
π³ docker exec cmd=[node /var/run/act/actions/[email protected]/dist/post/index.js] user= workdir=
| Skipping credential cleanup - $GOOGLE_GHA_CREDS_PATH is not set.
β
Success - Post Authorize to Google Cloud
β Run Post Setup Node
π³ docker exec cmd=[node /var/run/act/actions/[email protected]/dist/cache-save/index.js] user= workdir=
π¬ ::debug::Caching for '' is not supported
β
Success - Post Setup Node
π Job succeeded
Same here. Running Github Action with act.
Log output using 0.8.0
π Start image=catthehacker/ubuntu:act-latest
π³ docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=false
π³ docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
π³ docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
β git clone 'https://github.com/google-github-actions/auth' # ref=v0.8.0
β git clone 'https://github.com/google-github-actions/setup-gcloud' # ref=v0
β Run Main actions/[email protected]
β
Success - Main actions/[email protected]
β Run Main google auth
π³ docker cp src=/home/vscode/.cache/act/[email protected]/ dst=/var/run/act/actions/[email protected]/
close /tmp/act2629300275: file already closed
π³ docker exec cmd=[node /var/run/act/actions/[email protected]/dist/main/index.js] user= workdir=
π¬ ::debug::Using credentials JSON
π¬ ::debug::Creating credentials file
| Created credentials file at "/Users/komondor/projects/***/gha-creds-8d20268900c10f53.json"
|
β ::set-output:: credentials_file_path=/Users/komondor/projects/***/gha-creds-8d20268900c10f53.json
|
β ::set-output:: project_id=***
β
Success - Main google auth
β Run Main Set up Cloud SDK
π³ docker cp src=/home/vscode/.cache/act/[email protected]/ dst=/var/run/act/actions/[email protected]/
close /tmp/act3560929107: file already closed
π³ docker exec cmd=[node /var/run/act/actions/[email protected]/dist/main/index.js] user= workdir=
π¬ ::debug::isExplicit: 401.0.0
π¬ ::debug::explicit? true
π¬ ::debug::checking cache: /opt/hostedtoolcache/gcloud/401.0.0/arm64
π¬ ::debug::Found tool in cache gcloud 401.0.0 arm64
π¬ ::debug::isExplicit: 401.0.0
π¬ ::debug::explicit? true
π¬ ::debug::checking cache: /opt/hostedtoolcache/gcloud/401.0.0/arm64
π¬ ::debug::Found tool in cache gcloud 401.0.0 arm64
π¬ ::debug::Running command: gcloud --quiet components install kubectl
π¬ ::debug::Running command: gcloud --quiet auth activate-service-account [email protected] --key-file -
β
Success - Main Set up Cloud SDK
β Run Main gcloud info
π³ docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/3] user= workdir=./app/resto-clandestin
| Google Cloud SDK [401.0.0]
|
| Platform: [Linux, arm] uname_result(system='Linux', node='docker-desktop', release='5.10.104-linuxkit', version='#1 SMP PREEMPT Thu Mar 17 17:05:54 UTC 2022', machine='aarch64', processor='aarch64')
| Locale: ('en_US', 'UTF-8')
| Python Version: [3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]]
| Python Location: [/usr/bin/python3]
| OpenSSL: [OpenSSL 1.1.1f 31 Mar 2020]
| Requests Version: [2.22.0]
| urllib3 Version: [1.25.9]
| Site Packages: [Disabled]
|
| Installation Root: [/opt/hostedtoolcache/gcloud/401.0.0/arm64]
| Installed Components:
| gsutil: [5.12]
| core: [2022.09.03]
| kubectl: [1.22.12]
| bq: [2.0.75]
| gcloud-crc32c: [1.0.0]
| gke-gcloud-auth-plugin: [0.3.0]
| System PATH: [/opt/hostedtoolcache/gcloud/401.0.0/arm64/bin:/opt/hostedtoolcache/node/16.17.0/arm64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin]
| Python PATH: [/opt/hostedtoolcache/gcloud/401.0.0/arm64/lib/third_party:/opt/hostedtoolcache/gcloud/401.0.0/arm64/lib:/usr/lib/python38.zip:/usr/lib/python3.8:/usr/lib/python3.8/lib-dynload]
| Cloud SDK on PATH: [True]
| Kubectl on PATH: [/opt/hostedtoolcache/gcloud/401.0.0/arm64/bin/kubectl]
|
| Installation Properties: [/opt/hostedtoolcache/gcloud/401.0.0/arm64/properties]
| User Config Directory: [/root/.config/gcloud]
| Active Configuration Name: [default]
| Active Configuration Path: [/root/.config/gcloud/configurations/config_default]
|
| Account: [[email protected]]
| Project: [project-b]
|
| Current Properties:
| [auth]
| credential_file_override: [/Users/komondor/projects/***/gha-creds-8d20268900c10f53.json] (environment)
| [core]
| account: [[email protected]] (property file)
| disable_usage_reporting: [True] (property file)
| project: [***] (environment)
| [metrics]
| environment: [github-actions-setup-gcloud] (environment)
|
| Logs Directory: [/root/.config/gcloud/logs]
| Last Log File: [/root/.config/gcloud/logs/2022.09.09/22.40.34.987177.log]
|
| git: [git version 2.37.3]
| ssh: [OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f 31 Mar 2020]
|
|
β
Success - Main gcloud info
β Run Post Set up Cloud SDK
π³ docker exec cmd=[node /var/run/act/actions/[email protected]/dist/post/index.js] user= workdir=
| Skipping credential cleanup - "export_default_credentials" is false.
β
Success - Post Set up Cloud SDK
β Run Post google auth
π³ docker exec cmd=[node /var/run/act/actions/[email protected]/dist/post/index.js] user= workdir=
| Removed exported credentials at "/Users/komondor/projects/***/gha-creds-8d20268900c10f53.json".
β
Success - Post google auth
π Job succeeded
Owner Name | google-github-actions |
Repo Name | auth |
Full Name | google-github-actions/auth |
Language | TypeScript |
Created Date | 2021-09-16 |
Updated Date | 2023-03-24 |
Star Count | 573 |
Watcher Count | 16 |
Fork Count | 116 |
Issue Count | 3 |
Issue Title | Created Date | Updated Date |
---|