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

Outputs object is always empty #25

Closed
followbl opened this issue Feb 18, 2020 · 8 comments · Fixed by #29 or #38
Closed

Outputs object is always empty #25

followbl opened this issue Feb 18, 2020 · 8 comments · Fixed by #29 or #38
Assignees
Labels
Type: Bug Bug or Bug fixes
Milestone

Comments

@followbl
Copy link

followbl commented Feb 18, 2020

Is there anything I'm doing wrong here? I'm having trouble accessing the output from the now-deployment step...found adding the id to the step in the forums, but still no luck. Any assistance if I'm missing something simple is appreciated.

name: CI
on: [pull_request]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1

      - name: Deploy
        uses: amondnet/now-deployment@v1
        with:
          zeit-token: ${{ secrets.ZEIT_TOKEN }} # Required
          zeit-team-id: team_123 #Optional
          now-args: "--scope team123 --confirm"
        id: build_zeit

      - name: Cypress Test
        uses: cypress-io/github-action@v1
        with:
          config: baseUrl=${{ steps.build_zeit.outputs.preview-url }}
@amondnet amondnet self-assigned this Feb 18, 2020
@amondnet amondnet added the Type: Bug Bug or Bug fixes label Feb 18, 2020
@peterschrott
Copy link

Also ran into that issue.

Its only set if comment on commit or pull is enabled.

@followbl
Copy link
Author

@peterschrott I owe you a ☕, works beautifully. @amondnet will leave this open for you as it seems you add the bug label (and the bug without the PR comment enabled could still exist)...but for now @peterschrott solved the issue at hand. Thanks all 🥇

amondnet added a commit that referenced this issue Feb 19, 2020
output is only set if comment on commit or pull is enabled.

fix #25
@amondnet amondnet added this to the v2.0.1 milestone Feb 25, 2020
@amondnet
Copy link
Owner

@followbl
fixed. Could you try with v2.0.1?

@followbl
Copy link
Author

followbl commented Mar 2, 2020

@amondnet tested this right when you ping'ed me and then forgot to comment. unfortunately for me the output is empty still if I take away github-token. Adding that keeps the output from being null.

@amondnet amondnet reopened this Mar 11, 2020
@hakonkrogh
Copy link

@amondnet Looks like the issue with getting the preview url can be solved quite easily since the preview url is the only thing stored in the myOutput variable in the deployment step. I've forked your repo and I'm using my fork successfully in my projects:

https://github.com/hakonkrogh/now-deployment

I can create a pull request for this if you want to.

@amondnet
Copy link
Owner

@hakonkrogh Yes, I would appreciate it.

@hakonkrogh
Copy link

@hakonkrogh Yes, I would appreciate it.

#38

@amondnet amondnet linked a pull request Apr 4, 2020 that will close this issue
@amondnet
Copy link
Owner

amondnet commented Apr 4, 2020

@followbl closed this in #38

@amondnet amondnet closed this as completed Apr 4, 2020
@amondnet amondnet modified the milestones: v2.0.1, v2.0.2 Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants