How to create issues via an action

I was trying to create an GitHub action (here) that open an issue or at least adds a comment to an existing issue when an event occurs.
However, whenever I try to do it using curl, it says needs authentication. I tried authenticating to my account via ${{ secrets.GITHUB_TOKEN }} but I get an error.
What am I doing wrong?
I am not sure if this is the correct place to ask for help, but the docs did not provide any guidance.
Is this require something special or can it just be done via normal actions or the REST api?

Thank you!

Hi, firstly we wanted to mention actions/github-script, as it might help you in the future to make API calls easier:

For the error itself, we weren’t able to find the specific workflow run demonstrating this error, but most likely you could resolve this issue by using a PAT instead of the GITHUB_TOKEN:

You can then add it as a secret, and use the secret in the workflow to make the API call:

1 Like

@github-support I am a bit busy, but I will look at that later.
Thank you for your help!

I have found a solution.

another option: it appears that the runners have the github cli installed on them by default

1 Like

@dradetsky Thanks!
I will look into GitHub cli!