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

await is only valid in async function #51

Closed
kaihendry opened this issue Apr 2, 2020 · 7 comments
Closed

await is only valid in async function #51

kaihendry opened this issue Apr 2, 2020 · 7 comments

Comments

@kaihendry
Copy link

I'm trying a couple of examples upon:
kaihendry/dabase.com#7

And I'm getting as you can see upon
https://github.com/kaihendry/dabase.com/actions/runs/68702196

await is only valid in async function error.

I think it's because:

mkdir -p .github/workflows/ && cd .github/workflows/ && wget https://gist.githubusercontent.com/nwtgck/a9b291f6869db42ecc3d9e30d0a0494c/raw/comment-run.yml

Which is v1 not v1.1

@nwtgck
Copy link
Owner

nwtgck commented Apr 2, 2020

@kaihendry Thank you for reporting.

Have you solved the problem with v1 or v1.1? But anyway, I'll update the Gist code.

@kaihendry
Copy link
Author

I updated to 1.1. Ideally I could just be running latest? How do I express that?

@nwtgck
Copy link
Owner

nwtgck commented Apr 2, 2020

@kaihendry This one is an expected behavior.

image

Top-level await, no async () => {}.

Actual comment

#30 (comment)

Comment

@github-actions run

```js
await postComment("hello, world");
```

You can use this comment, copy-and-paste.

@nwtgck
Copy link
Owner

nwtgck commented Apr 3, 2020

@kaihendry Did you solve this problem?

@kaihendry
Copy link
Author

Yes, though is there a way to fix on your latest workflow version? Does @latest work I wonder? 😆

@nwtgck
Copy link
Owner

nwtgck commented Apr 6, 2020

@kaihendry When you use v1, v1.1 or v1.1.2, it's ok. I don't provide @latest.

@nwtgck
Copy link
Owner

nwtgck commented Apr 17, 2020

Could you solve this problem? If so, I'd like close this issue.

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

2 participants