-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Build multi-arch rootless-cni-infra on GitHub Actions #8415
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build rootless-cni-infra | ||
on: [push, pull_request] | ||
jobs: | ||
release: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: "Register QEMU to /proc/sys/fs/binfmt_misc" | ||
run: docker run --privileged --rm tonistiigi/binfmt --install all | ||
- name: "Fetch buildx binary" | ||
run: | | ||
wget -O buildx https://github.com/docker/buildx/releases/download/v0.4.2/buildx-v0.4.2.linux-amd64 | ||
chmod +x buildx | ||
- name: "Initialize buildx" | ||
run: | | ||
./buildx create --name cross --platform=amd64,arm,arm64,s390x,ppc64le --use | ||
./buildx inspect --bootstrap | ||
- name: "Build rootless-cni-infra.tar.gz (Multi-arch OCI archive)" | ||
run: | | ||
./buildx build \ | ||
--output type=oci,dest=rootless-cni-infra.tar \ | ||
--platform amd64,arm,arm64,s390x,ppc64le \ | ||
-f contrib/rootless-cni-infra/Containerfile \ | ||
contrib/rootless-cni-infra | ||
gzip -9 rootless-cni-infra.tar | ||
- name: "Print SHA256SUM of rootless-cni-infra.tar.gz" | ||
run: | | ||
sha256sum rootless-cni-infra.tar.gz | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps this is my own ignorance: What is the purpose of calculating/printing the sha256sum of the tarball? |
||
- name: "Upload rootless-cni-infra.tar.gz as a GitHub Artifact" | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: rootless-cni-infra.tar.gz | ||
path: rootless-cni-infra.tar.gz | ||
- name: "Notice" | ||
run: | | ||
echo "The image is NOT pushed to quay. To push the image to quay, run skopeo manually with the artifact archive." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Were you thinking of implementing the push to quay, or is that something I could/should do as a followup PR? I'm okay either way, but since I need to create the accounts and add the secrets, it might be easier if done as a followup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure the compression is worthwhile here,
actions/upload-artifact
will create a compressed zip-file automatically.