-
Notifications
You must be signed in to change notification settings - Fork 16
fix(gar/gcs): stop creating files and folders within workdir #894
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
base: main
Are you sure you want to change the base?
Conversation
It will probably work, since we made this change, so I don't believe that we need credentials file anymore. At least for login-to-gar. But we have to test it first. Will do soon |
@@ -138,7 +138,7 @@ runs: | |||
|
|||
- name: Login to GAR | |||
if: ${{ inputs.push == 'true' }} | |||
uses: ./shared-workflows/actions/login-to-gar | |||
uses: /tmp/shared-workflows/actions/login-to-gar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work - I get
Error: grafana/shared-workflows/gc/disable-google-creds-file/actions/push-to-gar-docker/action.yaml (Line: 141, Col: 13): Expected format {org}/{repo}[/path]@ref. Actual '/tmp/shared-workflows/actions/login-to-gar'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, modified that to use ../
instead of tmp
hopefully that works!
Just as a general question: For what scenarios are these credentials in a file needed? Probably not gcloud-cli commands, right? |
We needed this here in order for gcloud to work. Now that we use an auth_token, doesn't look like we need it anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this and doesn't work, so requesting changes in order to not break peoples workflows which run from main
. I'd split this PR to two - one to remove the credentials and another one to change paths. I can create one PR to change the paths and then we can rebase this one.
@guicaulada @zerok please let me know if you think this is a good idea for the one part of this issue :) |
This pull request includes changes to the GitHub Actions workflow files to improve the handling of credentials when logging into Google services. The main change is the addition of the
create_credentials_file: false
parameter to prevent the creation of unnecessary credentials files.Changes to
actions/login-to-gar/action.yaml
:create_credentials_file: false
to thewith
section to prevent creating credentials files during the login process. [1] [2]Changes to
actions/login-to-gcs/action.yaml
:create_credentials_file: false
to thewith
section to prevent creating credentials files during the login process.This is to stop the action from dirtying the current working directory causing issues for actions that rely on the state of the local git repository.