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

Alias does not incorporate scope #23

Closed
aulneau opened this issue Jul 27, 2020 · 5 comments · Fixed by #24
Closed

Alias does not incorporate scope #23

aulneau opened this issue Jul 27, 2020 · 5 comments · Fixed by #24
Milestone

Comments

@aulneau
Copy link
Contributor

aulneau commented Jul 27, 2020

This command should take into account scope if it's set -> https://github.com/amondnet/vercel-action/blob/master/index.js#L271-L277

@aulneau
Copy link
Contributor Author

aulneau commented Jul 27, 2020

@amondnet I have implemented a fix here -> #24 :)

@amondnet
Copy link
Owner

amondnet commented Aug 12, 2020

closed by #24

@amondnet amondnet added this to the v19.0.1+3 milestone Aug 12, 2020
@amondnet amondnet linked a pull request Aug 12, 2020 that will close this issue
@kbakk
Copy link

kbakk commented Oct 15, 2020

@amondnet Is it possible that this bug has resurfaced?

I'm seeing the following in our logs:

- Fetching deployment to alias in ci2
Error! Failed to find deployment "our-deployment-abcdefghi.vercel.app" under ci2

It seems to ignore the scope – projct is our-deployment (actually something else, but obfuscated it).

Full GitHub actions logs output with ACTIONS_STEP_DEBUG=true
Run amondnet/vercel-action@v19
  with:
    github-token: ***
    vercel-token: ***
    vercel-org-id: ***
    vercel-project-id: ***
    working-directory: packages/apps/our-deployment
    alias-domains: stage.our-deployment.example.com
  
    vercel-project-name: our-deployment
    github-comment: true
    github-deployment: false
  env:
    APP_NAME: our-deployment
    PROJECT_PATH: packages/apps/our-deployment
    VERCEL_PROJECT_NAME: our-deployment
##[debug]before slugify: "refs/tags/our-deployment/v1.0.4-rc"; after slugify: "refstagsour-deploymentv104-rc"
##[debug]action : amondnetvercel-action
##[debug]ref : refs/tags/our-deployment/v1.0.4-rc
##[debug]eventName : push
##[debug]actor : kbakk
##[debug]sha : 12028cac3f473169d44be5fc799c653ab5a8a5ef
##[debug]workflow : Our Workflow [tags]
set environment for vercel cli
set env variable : VERCEL_ORG_ID
set env variable : VERCEL_PROJECT_ID
##[debug]The head commit is: [object Object]
/usr/local/bin/npx vercel  -t *** -m githubCommitSha=12028cac3f473169d44be5fc799c653ab5a8a5ef -m githubCommitAuthorName=kbakk -m githubCommitAuthorLogin=kbakk -m githubDeployment=1 -m githubOrg=our-github-organization -m githubRepo=our-github-repo -m githubCommitOrg=our-github-organization -m githubCommitRepo=our-github-repo -m githubCommitMessage=Check for NOT equal -m githubCommitRef=refs/tags/our-deployment/v1.0.4-rc
Vercel CLI 20.1.2

Vercel CLI 20.1.2
- Deploying our-organization/our-deployment

- Deploying our-organization/our-deployment

Inspect: vercel.com/our-organization/our-deployment/abcdefghi [683ms]

Inspect: vercel.com/our-organization/our-deployment/abcdefghi [683ms]
our-deployment-abcdefghi.vercel.app
our-deployment-abcdefghi.vercel.app- Building

- Building

- Completing

- Completing

Preview: our-deployment-git-refs-tagsour-deploymentv104-rc.our-organization.vercel.app [3s]
To deploy to production (prod.our-deployment.example.com +2), run `vercel --prod`

Preview: our-deployment-git-refs-tagsour-deploymentv104-rc.our-organization.vercel.app [3s]
To deploy to production (prod.our-deployment.example.com +2), run `vercel --prod`
set preview-url output
set preview-url output as first alias
::set-output name=preview-url::stage.our-deployment.example.com
##[debug]='stage.our-deployment.example.com'
set preview-name output
::set-output name=preview-name::our-deployment
##[debug]='our-deployment'
alias domains to this deployment
/usr/local/bin/npx vercel -t *** alias our-deployment-abcdefghi.vercel.app stage.our-deployment.example.com
Vercel CLI 19.2.0
- Fetching deployment to alias in ci2
Error! Failed to find deployment "our-deployment-abcdefghi.vercel.app" under ci2
Error: The process '/usr/local/bin/npx' failed with exit code 1
##[debug]Node Action run completed with exit code 1
##[debug]VERCEL_ORG_ID='***'
##[debug]VERCEL_PROJECT_ID='***'
##[debug]Finishing: Run amondnet/vercel-action@v19

@amondnet
Copy link
Owner

@kbakk

      - uses: vercel-action@v19 //v19.0.1+1
        id: vercel-action
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          vercel-token: ${{ secrets.VERCEL_TOKEN }}
          vercel-org-id: ${{ secrets.VERCEL_ORG_ID_TEAM_SCOPE }}
          vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_TEAM_SCOPE }}
          working-directory: example/team-scope
          scope: ${{ secrets.VERCEL_SCOPE }}

Set the scope value and try again. If that doesn't work, let me know.

scope: ${{ secrets.VERCEL_SCOPE }}

@kbakk
Copy link

kbakk commented Oct 16, 2020

@amondnet Thanks, that helped! 🙂

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 a pull request may close this issue.

3 participants