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

env-vars with spaces fail when passed using --env in vercel-args #236

Closed
wilsonpage opened this issue Sep 28, 2023 · 1 comment
Closed

Comments

@wilsonpage
Copy link

  1. Set a repo secret that includes spaces (eg -----BEGIN PRIVATE KEY----- …)
  2. Reference it in the Github Actions Workflow.
- uses: amondnet/vercel-action@v25
  with:
    vercel-token: ${{ secrets.VERCEL_TOKEN }}
    
    vercel-args: >-
      --env MY_VAR=${{ secrets.VAR_WITH_SPACES }}
  1. Observe bash error: Error! The specified file or directory "PRIVATE" does not exist.

Wrapping with " still fails, so I'm assuming this is an issue in vercel-action.

- uses: amondnet/vercel-action@v25
  with:
    vercel-token: ${{ secrets.VERCEL_TOKEN }}
    
    vercel-args: >-
      --env MY_VAR="${{ secrets.VAR_WITH_SPACES }}"
@skyf0l
Copy link
Contributor

skyf0l commented Jan 11, 2024

Fixed by #237 and merged. Until the release you can use a commit pin as follows in your workflow:

- uses: amondnet/vercel-action@8433ae13f35aa62d68184a8fc369ce6b0143b0a3
  with:
    vercel-token: ${{ secrets.VERCEL_TOKEN }}
    
    vercel-args: >-
      --env "MY_VAR=${{ secrets.VAR_WITH_SPACES }}"

(Wrap the full "NAME=VALUE" in quotes).

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

No branches or pull requests

3 participants