Skip to content

Commit 3210b6a

Browse files
add arm support
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
1 parent b9d4f13 commit 3210b6a

1 file changed

Lines changed: 33 additions & 1 deletion

File tree

.github/workflows/pull-request-check-publish.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,47 @@ jobs:
8282
run: |
8383
docker image rm che-code-amd64 || true
8484
docker system prune -af
85+
86+
- name: Check if arm64 artifact exists
87+
id: check-arm64
88+
run: |
89+
if [ -f che-code-arm64.tgz ]; then
90+
echo "exists=true" >> $GITHUB_OUTPUT
91+
else
92+
echo "exists=false" >> $GITHUB_OUTPUT
93+
fi
94+
95+
- name: Load che-code-arm64 image
96+
if: steps.check-arm64.outputs.exists == 'true'
97+
run: |
98+
docker load -i che-code-arm64.tgz
99+
100+
- name: Push che-code-arm64 docker image
101+
if: steps.check-arm64.outputs.exists == 'true'
102+
run: |
103+
export IMAGE=quay.io/${{ secrets.QUAY_USERNAME }}/che-code:pr-${{env._PR_NUMBER}}-arm64
104+
docker tag che-code-arm64 ${IMAGE}
105+
docker push ${IMAGE}
106+
echo "_CHE_CODE_ARM64_IMAGE=${IMAGE}" >> $GITHUB_ENV
107+
108+
- name: Remove che-code-arm64 and prune
109+
if: steps.check-arm64.outputs.exists == 'true'
110+
run: |
111+
docker image rm che-code-arm64 || true
112+
docker system prune -af
85113
86114
- name: 'Comment PR'
87115
uses: actions/github-script@v7
88116
with:
89117
script: |
90118
const { repo: { owner, repo } } = context;
119+
let body = `Pull Request images published ✨\n\nEditor amd64: [${process.env._CHE_CODE_AMD64_IMAGE}](https://${process.env._CHE_CODE_AMD64_IMAGE})`;
120+
if (process.env._CHE_CODE_ARM64_IMAGE) {
121+
body += `\nEditor arm64: [${process.env._CHE_CODE_ARM64_IMAGE}](https://${process.env._CHE_CODE_ARM64_IMAGE})`;
122+
}
91123
await github.rest.issues.createComment({
92124
issue_number: process.env._PR_NUMBER,
93125
owner: context.repo.owner,
94126
repo: context.repo.repo,
95-
body: `Pull Request images published ✨\n\nEditor amd64: [${process.env._CHE_CODE_AMD64_IMAGE}](https://${process.env._CHE_CODE_AMD64_IMAGE})`
127+
body
96128
})

0 commit comments

Comments
 (0)