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

ci: Add a workflow to check Wi-Fi FW patch version #1117

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

krish2718
Copy link
Contributor

This workflow checks the version between the C header and the firmware patch bins and leaves a comment.

@krish2718 krish2718 force-pushed the ci_for_patch_version branch 5 times, most recently from 988aec2 to f0c9bd4 Compare November 7, 2023 20:40
if: ${{ always() }}
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you tested this?

I can't remember if checks in this context have the correct permissions to write comments

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still under testing, it doesn't work properly, my act doesn't seem to work, so, I am using this PR as my tests :).

I can't remember if checks in this context have the correct permissions to write comments

Oh, currently the step fails with an exception, I will check once its fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error: Unhandled error: HttpError: Resource not accessible by integration

Token doesn't have permissions, should I use a personal token or should we add commenting permissions? @thst-nordic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or I have modified to use pull_request_target but that requires merging

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GITHUB_TOKEN is an ephemeral token that will never have comment writing permissions.

to do this you need to have a static token from a bot that has comment permissions.
This is done in sdk-nrf with secrets.NCS_GITHUB_TOKEN
like this:
https://github.com/nrfconnect/sdk-nrf/blob/4efd7d8184a91ba8f87c797b740e31a00a0c4c83/.github/workflows/docpublish.yml#L69

static token is less safe than using GITHUB_TOKEN so you must be more careful that it can't be extracted on a public repo.

This workflow checks the version between the C header and the firmware
patch bins and leaves a comment.

Signed-off-by: Chaitanya Tata <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants