-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ct): replace QEMU with remote builder for ARM64 in base image
- Loading branch information
1 parent
eef60f2
commit 90cb9ce
Showing
1 changed file
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,10 +85,39 @@ jobs: | |
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Set up QEMU for multi-arch builds | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
# This is replaced by adding a remote ARM64 build host in addition to the local AMD64 | ||
# - name: Set up QEMU for multi-arch builds | ||
# uses: docker/setup-qemu-action@v3 | ||
# with: | ||
# platforms: ${{ env.PLATFORMS }} | ||
# Setup SSH access to ARM64 builder node | ||
- name: Setup SSH agent | ||
uses: webfactory/[email protected] | ||
with: | ||
platforms: ${{ env.PLATFORMS }} | ||
ssh-private-key: ${{ secrets.BUILDER_ARM64_SSH_PRIVATE_KEY }} | ||
- name: Provide the known hosts key and the builder config | ||
run: | | ||
echo "${{ secrets.BUILDER_ARM64_SSH_HOST_KEY }}" > ~/.ssh/known_hosts | ||
mkdir -p modules/container-base/target/buildx-state/buildx/instances | ||
cat modules/container-base/target/buildx-state/buildx/instances/dataverse << EOF | ||
{ "Name": "dataverse", | ||
"Driver": "docker-container", | ||
"Dynamic": false, | ||
"Nodes": [{"Name": "dataverse0", | ||
"Endpoint": "unix:///var/run/docker.sock", | ||
"Platforms": [{"os": "linux", "architecture": "amd64"}], | ||
"DriverOpts": null, | ||
"Flags": ["--allow-insecure-entitlement=network.host"], | ||
"Files": null}, | ||
{"Name": "dataverse1", | ||
"Endpoint": "ssh://${{ secret.BUILDER_ARM64_SSH_CONNECTION }}", | ||
"Platforms": [{"os": "linux", "architecture": "arm64"}], | ||
"DriverOpts": null, | ||
"Flags": ["--allow-insecure-entitlement=network.host"], | ||
"Files": null}]} | ||
EOF | ||
- name: Add additional tags as options | ||
# TODO: remove the feature branch and re-enable the if/else! | ||
run: | | ||
|