Skip to content
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

revert fix secrets stored in JSON format (#473) #478

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

fairclothjm
Copy link
Contributor

@fairclothjm fairclothjm commented Jul 12, 2023

This change will revert to the behavior vault-action has exhibited since v2.1.2. This ensure that all JSON is valid when set as an environment variable and that step output will be a JSON object.

I can't find the source code of github actions to actually verify this, but it seems to me that when the step output is passed to another action using the with keyword, the github action framework actually JSON.stringify's the data. This means that anything that accepts a Vault secret as input will have a valid JSON string that can then be JSON.parse'd. For example, this allows the following to work:

- name: Authenticate to Google Cloud
        uses: google-github-actions/auth@v1.1.1
        with:
          credentials_json: ${{ steps.vault_secrets.outputs.google_credentials }}

@fairclothjm fairclothjm changed the title fix secrets stored in JSON format #473 revert fix secrets stored in JSON format (#473) Jul 12, 2023
@fairclothjm fairclothjm force-pushed the revert-b138504969048cdca4eddd95ba0b9ea051207ddf branch from 7e655cd to 77a7336 Compare July 12, 2023 21:27
@fairclothjm fairclothjm marked this pull request as ready for review July 12, 2023 21:59
@fairclothjm fairclothjm requested a review from a team July 12, 2023 21:59
@fairclothjm fairclothjm merged commit 0010502 into main Jul 13, 2023
6 checks passed
@fairclothjm fairclothjm deleted the revert-b138504969048cdca4eddd95ba0b9ea051207ddf branch July 13, 2023 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants