Open Azariagmt opened 1 year ago
Hello, I had the same issue today and installing node.js fixed the problem, try adding
- uses: actions/setup-node@v1
with:
node-version: '16'
Thanks @hbenedek that worked. Node version in runner was 18.16.0.
Related to #1382; probably needs fixing npcz/magic upstream.
After adding setup-node, the new error is "Resource not accessible by integration"
Also having the same issue; I think it's not having GITHUB_TOKEN
set in secrets:
https://github.com/iterative/cml/issues/595
Particularly, for me, I had set the workflow permissions in the actions yaml
; which was overwriting the permissions configured through the github settings UI. Updated like:
permissions:
actions: write
contents: write
id-token: write
issues: write
pull-requests: write
surely these aren't all necessary
@anitagraser and @gegnew correct that message is coming the token not having enough permissions for some operation.
if you are working on a forked repo I would check settings like in screenshots of the referenced issue.
If you are not using the cml runner
subcommand then github's token should be sufficient for everything with the following:
permissions:
contents: write
pull-requests: write
If you are using cml comment
to write/create an issue then issues: write
may be required. If you are using cml pr
and are modifying a github actions workflow from your workflow then actions: write
would be required.
Note: that the default token (if NO permissions are set) and your org/user has not changed any of the default actions/permission-related settings then the default token is enough for all operations minus cml runner
or modify a github actions workflow.
However, if you include ANY permissions in your definition for example id-token: write
then you need to list all of your required permissions, which would depend on your workflow.
permissions:
id-token: write
contents: write
pull-requests: write
should cover 95% of use cases outside of cml runner
If you need any more help feel free to open a permissions-related issue, if you can link me to the GitHub workflow or provide a snippet and I can take a look and help further.
Thank you, @dacbd. Enabling read and write permissions for actions did the trick.
I had an action which generated database schema whenever .dbml file was changed.
action file
The above action (cml comment) was working properly but is now raising the following error:
I changed the GITHUB_TOKEN with a personal access token with read and actions privilege but it's still raising the same issue
Other configurations I've tried:
cml comment create report.md
cml comment update --publish report.md