RfidResearchGroup / ChameleonUltra

The new generation chameleon based on NRF52840 makes the performance of card emulation more stable. And gave the chameleon the ability to read, write, and decrypt cards.
https://chameleonultra.com
GNU General Public License v3.0
878 stars 147 forks source link

break, break! #70

Closed doegox closed 1 year ago

doegox commented 1 year ago

Testing CI on PRs. DO NOT MERGE!

github-actions[bot] commented 1 year ago

You are welcome to add an entry to the CHANGELOG.md as well

doegox commented 1 year ago

Hi @augustozanellato I tried to activate the CI on PRs as well but it fails on some permissions of the builder. Do you think this can be fixed somehow ? cf https://github.com/RfidResearchGroup/ChameleonUltra/actions/runs/5920552326/job/16051975343?pr=70

ERROR: failed to solve: failed to push ghcr.io/rfidresearchgroup/chameleonultra-fw-builder:pr-70: unexpected status from POST request to https://ghcr.io/v2/rfidresearchgroup/chameleonultra-fw-builder/blobs/uploads/: 403 Forbidden
Error: buildx failed with: ERROR: failed to solve: failed to push ghcr.io/rfidresearchgroup/chameleonultra-fw-builder:pr-70: unexpected status from POST request to https://ghcr.io/v2/rfidresearchgroup/chameleonultra-fw-builder/blobs/uploads/: 403 Forbidden

Note, thsi PR is supposed to fail anyway, but on the compilation, not on the builder setup...

augustozanellato commented 1 year ago

Hi @augustozanellato I tried to activate the CI on PRs as well but it fails on some permissions of the builder. Do you think this can be fixed somehow?

I’ll have a look into that in a couple hours. Iirc github assigns different permissions on workflows triggered by PRs.

I could also make the workflow attach built binaries in a PR comment, would that be useful?

doegox commented 1 year ago

Thanks!

I could also make the workflow attach built binaries in a PR comment, would that be useful?

if not too much effort, why not. it could allow other ppl to test the PR more easily

augustozanellato commented 1 year ago

Thanks!

It kinda works on my end on PRs, see https://github.com/augustozanellato/ChameleonUltra/actions/runs/5925762563/job/16065813376?pr=1 (it still fails, but for a different reason) I think it could have something to do with the repository settings here in github, not 100% sure specifically what.

doegox commented 1 year ago

Ha but the fail on your repo is from https://github.com/augustozanellato/ChameleonUltra/blob/main/.github/workflows/rebase.yml Strange but totally unrelated with https://github.com/augustozanellato/ChameleonUltra/blob/main/.github/workflows/firmware.yml

xianglin1998 commented 1 year ago

If the chameleon_cli_main.exe packaged by pyinstaller can be added to the build product, and the bin resource compiled by gcc can be added, the process of direct use by users or testing by developers will be perfect.

xianglin1998 commented 1 year ago

If the chameleon_cli_main.exe packaged by pyinstaller can be added to the build product, and the bin resource compiled by gcc can be added, the process of direct use by users or testing by developers will be perfect.

Only Windows platform.

augustozanellato commented 1 year ago

@doegox figured out the issue, actions ran from forks don’t get write permissions, somebody with settings access to the repository should enable “Send write tokens to workflows from pull requests”, see https://docs.github.com/en/actions/security-guides/automatic-token-authentication#how-the-permissions-are-calculated-for-a-workflow-job Cc @iceman1001 that already helped us with settings issues

augustozanellato commented 1 year ago

If the chameleon_cli_main.exe packaged by pyinstaller can be added to the build product, and the bin resource compiled by gcc can be added, the process of direct use by users or testing by developers will be perfect.

Only Windows platform.

I could also look into that, but it’ll probably also package it at least for Linux (appimage) and maybe also macOS

augustozanellato commented 1 year ago

The issue can be fixed by switching trigger in firmware.yml from pull_request to pull_request_target, not making a pr for that because #80 will kinda rewrite everything ci-related :P

doegox commented 1 year ago

nice!