Closed danielhollas closed 3 weeks ago
I have an idea on how to support forks, basically just running the build and testing it in a single workflow without a push to ghcr.io.
As I mentioned, you can always use pull_request_target
, it allow CI to use GITHUB_TOKEN
from forked PR.
Hmm, this change broke tagging and publishing to ghcr.io. looking into it.
@sphuber this is now ready. There is one functional change here regarding tagging. Since we run on push event, images on ghcr.io will not be tagged with a PR number, but by a branch name.
So if you push a branch docker-build-refactor
to aiidateam/aiida-core
origin, you can download the image as docker pull ghcr.io/aiidateam/aiida-core-base:docker-build-refactor
.
CC @unkcpz
This workflow needs permissions to publish images to ghcr.io, so it does not work for forks. Therefore, let's only trigger it on pushes to aiidateam/aiida-core repo.
I have an idea on how to support forks, basically just running the build and testing it in a single workflow without a push to ghcr.io. But that will be cleaner as a completely separate worfkflow. I'll submit a follow-up PR for that.