Skip to content

Commit afb433f

Browse files
authored
Merge pull request #117 from openshift-cherrypick-robot/cherry-pick-115-to-redhat-3.12
[redhat-3.12] Move ppc64le/s390x builders from QEMU to a remote machine
2 parents 521c6ce + 845562e commit afb433f

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

.github/workflows/build-and-publish.yaml

+38-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,47 @@ jobs:
3333
BRANCH_NAME=${GITHUB_REF#refs/heads/}
3434
echo "::set-output name=version::${BRANCH_NAME/${{ env.BRANCH_PREFIX }}/}"
3535
36-
- name: Set up QEMU
37-
uses: docker/setup-qemu-action@v2
36+
- name: Setup SSH config for builders
37+
env:
38+
BUILDER_PPC64LE_SSH_CONFIG: ${{ secrets.BUILDER_PPC64LE_SSH_CONFIG }}
39+
BUILDER_PPC64LE_SSH_KEY: ${{ secrets.BUILDER_PPC64LE_SSH_KEY }}
40+
BUILDER_PPC64LE_SSH_KNOWN_HOSTS: ${{ secrets.BUILDER_PPC64LE_SSH_KNOWN_HOSTS }}
41+
BUILDER_S390X_SSH_CONFIG: ${{ secrets.BUILDER_S390X_SSH_CONFIG }}
42+
BUILDER_S390X_SSH_KEY: ${{ secrets.BUILDER_S390X_SSH_KEY }}
43+
run: |
44+
mkdir ~/.ssh
45+
chmod 700 ~/.ssh
46+
touch ~/.ssh/id_builder_ppc64le
47+
chmod 600 ~/.ssh/id_builder_ppc64le
48+
echo "$BUILDER_PPC64LE_SSH_KEY" >~/.ssh/id_builder_ppc64le
49+
touch ~/.ssh/id_builder_s390x
50+
chmod 600 ~/.ssh/id_builder_s390x
51+
echo "$BUILDER_S390X_SSH_KEY" > ~/.ssh/id_builder_s390x
52+
touch ~/.ssh/known_hosts
53+
chmod 600 ~/.ssh/known_hosts
54+
cat >~/.ssh/known_hosts <<END
55+
$BUILDER_PPC64LE_SSH_KNOWN_HOSTS
56+
END
57+
touch ~/.ssh/config
58+
chmod 600 ~/.ssh/config
59+
cat >~/.ssh/config <<END
60+
Host builder-ppc64le
61+
IdentityFile "~/.ssh/id_builder_ppc64le"
62+
$BUILDER_PPC64LE_SSH_CONFIG
63+
Host builder-s390x
64+
IdentityFile "~/.ssh/id_builder_s390x"
65+
$BUILDER_S390X_SSH_CONFIG
66+
END
3867
3968
- name: Set up Docker Buildx
4069
uses: docker/setup-buildx-action@v2
70+
with:
71+
platforms: linux/amd64
72+
append: |
73+
- endpoint: ssh://builder-ppc64le
74+
platforms: linux/ppc64le
75+
- endpoint: ssh://builder-s390x
76+
platforms: linux/s390x
4177
4278
- name: Login to Quay.io
4379
uses: docker/login-action@v1

0 commit comments

Comments
 (0)