After running google-github-actions/[email protected], if I run a bash command with curly braces, those are replaced by "***"
{"key": "val"}
***"key": "val"***
name: test auth
on:
workflow_dispatch:
jobs:
deployment:
runs-on: ubuntu-latest
steps:
- name: "bash command"
shell: bash
run: |
echo '{"key": "value"}'
- name: Pull code into container
uses: actions/[email protected]
- name: "Authenticate to Google Cloud"
uses: "google-github-actions/[email protected]"
with:
credentials_json: "${{ secrets.GCP_CREDENTIALS }}"
- name: "Bash"
shell: bash
run: |
data="{\"key_2\": \"value2\"}"
echo $data
No response
Hi @benbenben2
Thank you for opening an issue. This is not because of the auth
action, but rather because you consumed a GitHub Secret which had a curly brace on its own line. For example, try the following workflow:
name: repro
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: |-
echo '{"key": "value"}'
- run: |-
echo '${{ secrets.GCP_CREDENTIALS }}'
- run: |-
echo '{"key": "value"}'
You will see that all curly braces are removed from the log output, because GitHub automatically scrubs each line of a secret when it's consumed in a workflow.
I'm going to add this to the troubleshooting steps, but unfortunately this is out of our control since it's handled at the GitHub Actions layer, before it touches our workflow. The best workaround would be to switch to Workload Identity Federation or compress your JSON credentials into a single line.
Hi @sethvargo
Thank you for your reply.
Ok, so it has nothing to do with auth
action. Sorry to have raised a bug for that.
I will close the issue.
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 |
---|