Skip to content

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

Merged
fairclothjm merged 1 commit intomainfrom
revert-b138504969048cdca4eddd95ba0b9ea051207ddf
Jul 13, 2023
Merged

revert fix secrets stored in JSON format (#473)#478
fairclothjm merged 1 commit intomainfrom
revert-b138504969048cdca4eddd95ba0b9ea051207ddf

Conversation

@fairclothjm
Copy link
Copy Markdown
Collaborator

@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
@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.

2 participants