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

workflows/dispatch-build-bottle: run prepare job as root in container #186800

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

ZhongRuoyu
Copy link
Member

This unfortunately didn't work due to permission issues: https://github.com/Homebrew/homebrew-core/actions/runs/10809935351/job/29986089580

A workaround could be to set options: --user root, but brew ruby will probably refuse to run as root.

Reverts #186614

@ZhongRuoyu ZhongRuoyu requested review from MikeMcQuaid and a team as code owners September 11, 2024 10:45
@github-actions github-actions bot added workflows PR modifies GitHub Actions workflow files automerge-skip `brew pr-automerge` will skip this pull request labels Sep 11, 2024
Copy link
Contributor

Hi, thanks for your contribution to Homebrew! You already have >=15 open pull requests, so please get them ready to be merged or close them before you open more. If CI fails on any of them, please fix it or ask for help doing so.
If you are performing simple version bumps, @BrewTestBot automatically bumps a list of formulae so you don't need to. Please take a look at issues and pull requests labelled help wanted Task(s) needing PRs from the community or maintainers and see if you can help to fix any of them. Thanks!

@github-actions github-actions bot closed this Sep 11, 2024
@ZhongRuoyu ZhongRuoyu reopened this Sep 11, 2024
@ZhongRuoyu
Copy link
Member Author

A workaround could be to set options: --user root, but brew ruby will probably refuse to run as root.

Actually, that should actually work in Docker. Do we want that though? I'm not sure.

@carlocab
Copy link
Member

Actually, that should actually work in Docker. Do we want that though? I'm not sure.

Should be fine for the prepare job. But I'm happy to change my position if someone has a strong objection.

@ZhongRuoyu ZhongRuoyu force-pushed the revert-186614-dispatch-build-bottle-container branch from 21683f7 to e02a249 Compare September 11, 2024 11:00
@carlocab carlocab changed the title Revert "workflows/dispatch-build-bottle: set container" workflows/dispatch-build-bottle: run prepare job as root in container Sep 11, 2024
Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

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

Let's ship this for now since this is blocking bottling.

@ZhongRuoyu ZhongRuoyu added this pull request to the merge queue Sep 11, 2024
Merged via the queue into master with commit 0e0908e Sep 11, 2024
18 checks passed
@ZhongRuoyu ZhongRuoyu deleted the revert-186614-dispatch-build-bottle-container branch September 11, 2024 11:21
@@ -50,6 +50,7 @@ jobs:
runs-on: ubuntu-22.04
container:
image: ghcr.io/homebrew/ubuntu22.04:master
options: --user=root
Copy link
Member

Choose a reason for hiding this comment

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

Note that the alternative to this is to sudo chown "${GITHUB_OUTPUT}", but I don't know how to translate that to JavaScript. 🥲

Hopefully someone else can tell us!

@Bo98
Copy link
Member

Bo98 commented Sep 11, 2024

You don't need root if you move setup-homebrew to run first. It applies the necessary permission fixes to make everything work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge-skip `brew pr-automerge` will skip this pull request workflows PR modifies GitHub Actions workflow files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants