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

Can't use multiple line val in env_vars #554

Open
onel opened this issue Dec 20, 2024 · 4 comments
Open

Can't use multiple line val in env_vars #554

onel opened this issue Dec 20, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@onel
Copy link

onel commented Dec 20, 2024

TL;DR

I'm trying to deploy to cloud run and one of the env_vars has a value that is multi line, specifically it is a PEM key.
This seems to make the key not be used properly in cloud run UI.
The problem is with GH_APP_PRIVATE_KEY
Tried with with both "" and without.

In the google console UI the output looks like this
image

This might be a yaml question more than a deploy-cloudrun one.

Expected behavior

No response

Observed behavior

No response

Action YAML

- name: Deploy to Google Cloud Run
        uses: google-github-actions/deploy-cloudrun@v2

        with:
          service: ${{ env.RUN_SERVICE }}
          image: ${{ env.GAR_LOCATION }}
          region: ${{ env.REGION }}

          env_vars: |-
            DEBUG='False'
            GH_APP_PRIVATE_KEY=${{ secrets.GH_APP_PRIVATE_KEY }}

Log output

No response

Additional information

No response

@onel onel added the bug Something isn't working label Dec 20, 2024
@sethvargo
Copy link
Member

Have you tried:

env_vars: |-
  GH_APP_PRIVATE_KEY="${{ secrets.GH_APP_PRIVATE_KEY }}"

If so, please provide the debug logs.

@onel
Copy link
Author

onel commented Dec 21, 2024

Yes, I've tried with quotes as well.

This is the log output specifically for the deploy job (the link expires in 1 week)
https://pastebin.com/r75Qjzaq

@sethvargo
Copy link
Member

sethvargo commented Dec 21, 2024

Pasting the relevant bits here for history:

GH_APP_PRIVATE_KEY="***,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***=,***"= 

It looks like parsing is actually successful, but then re-serialization is incorrect.

@onel
Copy link
Author

onel commented Dec 29, 2024

I see, so this might be a deploy-cloudrun bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants