How to fix POST /repos/…/check-runs 403 error on GitHub Action workflow

David Lee
2 min readMay 13, 2022

Today, I created a new GitHub repo and started a new .NET 6 project with some unit tests. As mentioned in an earlier article I wrote, when the unit test runs, the test result is generated, and we can publish it as part of the GitHub Action Workflow as seen in the example below.

Unit Test Results screenshot

Unfortunately, that did not happen as expected this time, and I encounter a strange 403 error.

POST /repos/…/check-runs error screenshot

What the hack is a POST /repos/…/check-runs error!

I tried my favorite search engines without much success. Finally, I had to go looking around, thinking it could be related to some permission issue because a file is being written?

I started with Actions permissions.

Action permissions screenshot

Nothing interesting yet, so I scrolled down and found something! Workflow permission and it defaulted to Read repository contents permission. Seemed like I need to have Read and write permissions instead.

Workflow permissions screenshot

I changed the setting, and my GitHub Action Workflow ran fine this time as seen in the first screenshot.

It seemed this must be something new because I have created GitHub projects in the past and had not encountered this issue until now. I hope this helps someone with a similar issue.

--

--