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

WIP: GHA: Docker workflow refactor #6388

Closed
wants to merge 8 commits into from

Conversation

danielhollas
Copy link
Collaborator

This is an analogous refactor that I did over at aiidalab-docker-stack, please see that PR for details. aiidalab/aiidalab-docker-stack#439

tl;dr This should both increase speed and robustness of the build, main due to:

  1. Not uploading image as artifacts. (this does have a side-effect that the build can't happen from forks, maybe we can workaround that)
  2. Build multiplatform images together

@sphuber
Copy link
Contributor

sphuber commented May 13, 2024

@unkcpz since you wrote these workflows, maybe it makes most sense if you review this? Happy to do it if you don't have the time

@unkcpz
Copy link
Member

unkcpz commented May 14, 2024

Sure, I'll do the review when it is ready.

@danielhollas
Copy link
Collaborator Author

@unkcpz I just realized, we're probably going to need an extra buildjet account for aiidateam org, right?

@unkcpz
Copy link
Member

unkcpz commented May 14, 2024

Yes, it is run using a separated account. But I guess you don't access to the dashboard to set it?

@danielhollas
Copy link
Collaborator Author

I don't think so, since I am not a member of aiidateam I don't think. But if it is already setup that's great.

@danielhollas
Copy link
Collaborator Author

@sphuber do you think you could (temporarily) give me a push access to this repo? Otherwise this PR is hard to test.

@sphuber
Copy link
Contributor

sphuber commented May 16, 2024

@sphuber do you think you could (temporarily) give me a push access to this repo? Otherwise this PR is hard to test.

Done

@danielhollas
Copy link
Collaborator Author

Thanks @sphuber. Opened #6396, closing this one.

@danielhollas danielhollas deleted the docker-refactor branch May 16, 2024 07:43
@unkcpz
Copy link
Member

unkcpz commented May 16, 2024

(this does have a side-effect that the build can't happen from forks, maybe we can workaround that)

As mentioned in another thread (aiidalab/aiidalab-qe#730), since the test was run before by PR from forked repo, then I'd be a bit disappointed this functionality disappeared.

There is an solution that we can use to allow to use the GITHUB_TOKEN by PR from the forked repo. It is called pull_request_target. It confines the PR from forked repo to run actions only when the specified files are modified.
I tested it in https://github.com/aiidateam/aiida-registry/blob/master/.github/workflows/plugin-ci.yml to allow plugin developers to trigger the PR preview when adding plugin to registry, only changes of plugins.yaml will trigger the CI (Note: this is not the same as when using pull_request with path.) In this way, the GITHUB_TOKEN can be used to push things to registry.

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.

3 participants