Skip to content

Commit

Permalink
fix: Dashboard not building for Docker platform arm64/v8 (#2534)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 authored Oct 7, 2024
1 parent 2242218 commit 8c4a862
Show file tree
Hide file tree
Showing 5 changed files with 698 additions and 251 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,34 @@ jobs:
include:
- name: Docker linux/amd64
DOCKER_PLATFORM: linux/amd64
# Building currently fails for the platforms below
# - name: Docker linux/arm/v6
# DOCKER_PLATFORM: linux/arm/v6
# - name: Docker linux/arm/v7
# DOCKER_PLATFORM: linux/arm/v7
RUNNER_TYPE: ubuntu-latest
# - name: Docker linux/arm64/v8
# DOCKER_PLATFORM: linux/arm64/v8
# # Replace this with a native arm linux runner when available, presumably by EOY 2024, see:
# # https://github.com/orgs/community/discussions/19197#discussioncomment-10550689
# # The conditional setup of QEMU may need to be adapted to not run on native arm,
# # which will speed up the build process for arm64/v8 since no emulation will be needed.
# RUNNER_TYPE: ubuntu-latest
fail-fast: false
name: ${{ matrix.name }}
timeout-minutes: 15
runs-on: ubuntu-latest
timeout-minutes: 45
runs-on: ${{ matrix.RUNNER_TYPE }}
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
# Only set up QEMU if not running on native arm
if: ${{ matrix.DOCKER_PLATFORM != 'linux/amd64' && matrix.RUNNER_TYPE == 'ubuntu-latest' }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Build docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
platforms: ${{ matrix.DOCKER_PLATFORM }}
cache-from: type=gha
cache-to: type=gha,mode=max
check-lock-file-version:
name: NPM Lock File Version
timeout-minutes: 5
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/release-automated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
REGISTRY: docker.io
IMAGE_NAME: parseplatform/parse-dashboard
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
packages: write
Expand All @@ -52,29 +53,33 @@ jobs:
ref: ${{ needs.release.outputs.current_tag }}
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Log into Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=${{ steps.branch.outputs.branch_name == 'release' }}
tags: |
type=semver,pattern={{version}},value=${{ needs.release.outputs.current_tag }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64
platforms: linux/amd64, linux/arm64/v8
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
17 changes: 11 additions & 6 deletions .github/workflows/release-manual-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
packages: write
Expand All @@ -28,18 +29,20 @@ jobs:
ref: ${{ github.event.inputs.ref }}
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Log into Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
Expand All @@ -48,10 +51,12 @@ jobs:
type=semver,enable=true,pattern={{version}},value=${{ github.event.inputs.ref }}
type=raw,enable=${{ github.event.inputs.ref == '' }},value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64
platforms: linux/amd64, linux/arm64/v8
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Loading

0 comments on commit 8c4a862

Please sign in to comment.