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

Use artifacts instead of GHCR for build-kit-<reponame> #58

Merged
merged 13 commits into from
Oct 30, 2024

Conversation

andistorm
Copy link
Contributor

When running the forklow in a PR coming from a fork it is not possible to push to the Github Container Registry since secrets are not available in a "fork run".

  • Store build-kit- in build-kit.tar and upload as artifact
  • Download artifact and load docker image from build-kit.tar

Signed-off-by: Andreas Heinrich <[email protected]>
Signed-off-by: Andreas Heinrich <[email protected]>
Signed-off-by: Andreas Heinrich <[email protected]>
Signed-off-by: Andreas Heinrich <[email protected]>
Signed-off-by: Andreas Heinrich <[email protected]>
Signed-off-by: Andreas Heinrich <[email protected]>
@andistorm
Copy link
Contributor Author

.github/workflows/continuous_integration.yml Outdated Show resolved Hide resolved
.github/workflows/continuous_integration.yml Outdated Show resolved Hide resolved
name: Build and Push Build Kit
uses: everest/everest-ci/.github/workflows/[email protected]

build-build-kit:
Copy link
Contributor

Choose a reason for hiding this comment

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

build-build-kit sounds a bit strange

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Naming is hard :) I am open for suggestions

run: |
docker pull --quiet ${{ env.BUILD_KIT_IMAGE }}
docker load -i build-kit.tar
docker image tag ${{ env.BUILD_KIT_IMAGE }} build-kit
Copy link
Contributor

Choose a reason for hiding this comment

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

is this tag still necessary if the image has been tagged already before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not necessary but with this it is enough to just "hard code" build-kit as image name in the following.
If it wouldn't be tagged you would need to stick to ${{ env.BUILD_KIT_IMAGE }} everywhere which decreases readability

* Use tags for build-kit-<reponame>
* Don't support multi platform build

Signed-off-by: Andreas Heinrich <[email protected]>
Signed-off-by: Andreas Heinrich <[email protected]>
Signed-off-by: Andreas Heinrich <[email protected]>
Signed-off-by: Andreas Heinrich <[email protected]>
Signed-off-by: Andreas Heinrich <[email protected]>
Signed-off-by: Andreas Heinrich <[email protected]>
@andistorm andistorm merged commit 5356ac2 into main Oct 30, 2024
13 of 14 checks passed
@andistorm andistorm deleted the bugfix/build-kit-in-forks branch October 30, 2024 10:29
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