Warning "The "create_credentials_file" option is true, but the current GitHub workspace is empty" seems me redundant

This issue has been tracked since 2022-07-04.

TL;DR

I'm using this action for running GCP CLI - for starting and stopping VMs. I'd like to suppress this warning but I don't see a way to do that without checkout my repo.

Detailed design

Warning I get:
The "create_credentials_file" option is true, but the current GitHub workspace is empty. Did you forget to use "actions/checkout" before this step? If you do not intend to share authentication with future steps in this job, set "create_credentials_file" to false.

My job YAML: 

     - name: Authenticate to Google Cloud
        uses: google-github-actions/[email protected]
        with:
          credentials_json: '${{ secrets.GCP_SA_KEY }}'

Additional information

No response

github-actions[bot] wrote this answer on 2022-07-22

Hi there @vitalyk-multinarity 👋!

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.

sethvargo wrote this answer on 2022-07-22

Hi @vitalyk-multinarity

There have been a number of issues where users have not used the "actions/checkout" step before the auth action. This action relies on the creation of that directory to export credentials. Worse, if a user puts "actions/checkout" after our action, it will delete the exported credential.

This is only a warning and does not affect performance. If you really want the warning to go away, you can create an empty file in $GITHUB_WORKSPACE.

vitalykarasik wrote this answer on 2022-07-22

If you really want the warning to go away, you can create an empty file in $GITHUB_WORKSPACE
Somehow I missed this simple workaround and ran 'checkout' instead...
Many thanks!

More Details About Repo
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

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date