Skip to content

Theia Cloud Image for ARM64 #403 #404

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

Merged
merged 1 commit into from
Mar 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 44 additions & 18 deletions .github/workflows/reusable-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
docker_file:
required: true
type: string
platforms:
required: false
type: string
default: "linux/amd64,linux/arm64"
secrets:
dockerhub_username:
required: true
Expand Down Expand Up @@ -73,10 +77,23 @@ jobs:
echo "latest_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:latest" >> $GITHUB_OUTPUT
fi

# Only build when we will publish, so either a main merge with next-version or a release
- name: Build Docker image
if: github.event_name == 'push' && steps.version_check.outputs.is_next_version == 'true' || github.event_name == 'release'
run: docker build -t ${{ steps.get_tags.outputs.version_tag }} -f ${{ inputs.docker_file }} .
# Set up QEMU for multi-architecture builds
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0

# Set up Docker Buildx for multi-architecture builds
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
with:
install: true
driver: docker-container
driver-opts: |
image=moby/buildkit:latest
network=host

# List available platforms
- name: List docker buildx available platforms
run: docker buildx inspect --bootstrap

# Only log in to dockerhub when we will publish, so either a main merge with next-version or a release
- name: Login to DockerHub
Expand All @@ -86,20 +103,29 @@ jobs:
username: ${{ secrets.dockerhub_username }}
password: ${{ secrets.dockerhub_token }}

# Push for main merges with next version
- name: Push Docker tags (for push events with next version)
# Build and push for main merges with next version
- name: Build and push Docker tags (for push events with next version)
if: github.event_name == 'push' && steps.version_check.outputs.is_next_version == 'true'
run: |
docker push ${{ steps.get_tags.outputs.version_tag }}
docker tag ${{ steps.get_tags.outputs.version_tag }} ${{ steps.get_tags.outputs.sha_tag }}
docker push ${{ steps.get_tags.outputs.sha_tag }}
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
context: .
file: ${{ inputs.docker_file }}
push: true
tags: |
${{ steps.get_tags.outputs.version_tag }}
${{ steps.get_tags.outputs.sha_tag }}
platforms: ${{ inputs.platforms }}

# Push for releases
- name: Push Docker tags (for release events)
# Build and push for releases
- name: Build and push Docker tags (for release events)
if: github.event_name == 'release'
run: |
docker push ${{ steps.get_tags.outputs.version_tag }}
docker tag ${{ steps.get_tags.outputs.version_tag }} ${{ steps.get_tags.outputs.latest_tag }}
docker push ${{ steps.get_tags.outputs.latest_tag }}
docker tag ${{ steps.get_tags.outputs.version_tag }} ${{ steps.get_tags.outputs.next_tag }}
docker push ${{ steps.get_tags.outputs.next_tag }}
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
context: .
file: ${{ inputs.docker_file }}
push: true
tags: |
${{ steps.get_tags.outputs.version_tag }}
${{ steps.get_tags.outputs.latest_tag }}
${{ steps.get_tags.outputs.next_tag }}
platforms: ${{ inputs.platforms }}