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

Update dev-tools.md: add manually triggering CI #58

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

0x53A
Copy link
Contributor

@0x53A 0x53A commented Nov 6, 2024

ref godot-rust/gdext#933

Does hosting the picture on github work or should I check it directly into the repository?

@0x53A
Copy link
Contributor Author

0x53A commented Nov 6, 2024

Linter, bane of my existence

@0x53A
Copy link
Contributor Author

0x53A commented Nov 6, 2024

Error: Error: Pushing to https://github.com/0x53A/book
remote: Permission to 0x53A/book.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/0x53A/book/': The requested URL returned error: 403

If the PR itself is fine, i think you could copy my branch into your repository, close my PR and open a new one so the bot has permission to push the optimised image file,

@Bromeon Bromeon added the new-topic New content added to the book label Nov 6, 2024
@Bromeon Bromeon force-pushed the patch-1 branch 9 times, most recently from d6d4267 to 90ae6e8 Compare November 6, 2024 21:39
@Bromeon Bromeon force-pushed the patch-1 branch 2 times, most recently from aa1192a to a7860d1 Compare November 6, 2024 21:47
@Bromeon
Copy link
Member

Bromeon commented Nov 6, 2024

Thanks!

I've run into this issue before. I personally have the permissions to push commits, however the bot runs with a restricted setup. Our https://github.com/EndBug/add-and-commit action explains some stuff, but rather handwavy.

Experimented a bit with various permission and PATs, but I couldn't figure out how to allow the bot to push to your branch (since it comes from your repo). I even tried triggering another workflow in the same repo (workflow_dispatch + repository_dispatch), but also doesn't seem possible with the default GITHUB_TOKEN. Security can really sometimes be annoying.

It might work with pull_request_target instead of pull_request, but that's quite insecure and I couldn't checkout third-party code (from PRs), as that could be used to gain write access to the repo.

If you have any more ideas (other than manual invention), please let me know. I guess I could always just let oxipng fail and give the user instructions to fix the image themselves. Would just have been nice to automate this and not force contributors to go through the setup 😕

@0x53A
Copy link
Contributor Author

0x53A commented Nov 6, 2024

If you have any more ideas

instead of pushing directly to the branch of this PR (which the bot doesn't have permission), you could push to a branch of an additional fork, then send a PR against the fork. Then squash-merge the original PR to get rid of the history.

I guess I could always just let oxipng fail and give the user instructions to fix the image themselves.

would be great to add instructions with the smallest distance to the error message, ideally in the exact same job:
image

@0x53A
Copy link
Contributor Author

0x53A commented Nov 6, 2024

well i did figure out how to run oxypng so finally green. At the least it's a rust tool so installation was painless.

@0x53A
Copy link
Contributor Author

0x53A commented Nov 6, 2024

Man I fucking love rust (and especially cargo) so much, it's unbelievable how much better it is than everything before it.

Today I was trying to program an STM microcontroller, and the C/C++ environment is just so, so bad, and rust+cargo+probe-rs just ... worked.

@Bromeon Bromeon merged commit 0aae7bf into godot-rust:master Nov 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-topic New content added to the book
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants