export_default_credentials should place credentials outside of the workspace
See original GitHub issueTL;DR
GOOGLE_APPLICATION_CREDENTIALS should be stored in the action temporary directory, not in the checked out repository. Doing so creates a dirty git state.
Expected behavior git state is not dirty after exporting GOOGLE_APPLICATION_CREDENTIALS.
Observed behavior git state is dirty and shows up in automatic version detection and other release automation tools. https://goreleaser.com/, for instance, will hard fail if git state is dirty during a non-snapshot release.
Reproduction
Action YAML
name: Release
on:
release:
types:
- published
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.14.x
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
project_id: myproject
service_account_key: ${{ secrets.GCP_SERVICE_ACCOUNT }}
export_default_credentials: true
- name: Gcloud login
run: gcloud auth configure-docker
- name: Check git status
run: git status
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --config .github/goreleaser.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Repository
https://github.com/pomerium/pomerium/runs/891636795#step:9:31
Additional information No
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How Application Default Credentials works | Authentication
This command places a JSON file containing your credentials in a well-known location on your file system. The location depends on your operating...
Read more >Credentials Binding Plugin - Jenkins
Allows various kinds of credentials (secrets) to be used in idiosyncratic ways. (Some steps explicitly ask for credentials of a particular kind, ...
Read more >Manage Credentials - Tableau Help
Saved credentials enable you to connect to a data source without being prompted for your credentials. The credentials saved for your connection can...
Read more >Use external tables with Synapse SQL - Azure - Microsoft Learn
Hadoop external tables that you can use to read and export data in ... database scoped credential can specify workspace Managed Identity, ...
Read more >View alert details - Google Workspace Admin Help
From your list of alerts in the alert center, you can drill down to view more details about individual alerts. Each alert type...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @sethvargo As I see GH actions do not mount /home/runner/work/_temp/uuidv inside Docker based actions. After this change, I have lost the ability to use a file with GCP JSON key inside my Docker container. Previously it was process.env.GITHUB_WORKSPACE which is mounted inside Docker container as volume and I had the path to GCP key inside GOOGLE_APPLICATION_CREDENTIALS variable during execution of GH action.
👍