Skip to content
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

ci: attempt to fix docker builds by building arm64 and amd64 separately #6588

Merged
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
54 changes: 43 additions & 11 deletions .github/workflows/release_docker_hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@ on:
types: [published]

jobs:
release:
name: Release to Docker Hub
release-amd64:
name: Release to Docker Hub (amd64)
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v7.0.0-28

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

Expand Down Expand Up @@ -60,8 +55,45 @@ jobs:
flavor: |
suffix=${{ steps.suffix.outputs.result }},onlatest=true

- name: Build and push
id: docker_build
- name: Build and push (amd64)
id: docker_build_amd64
uses: docker/build-push-action@v3
with:
context: ./contrib/containers/deploy
file: ./contrib/containers/deploy/Dockerfile.GitHubActions.Release
push: true
provenance: mode=max
sbom: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
build-args: |
TAG=${{ steps.get_tag.outputs.build_tag }}
GITHUB_REPOSITORY=${{ github.repository }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64

- name: Image digest
run: echo ${{ steps.docker_build_amd64.outputs.digest }}

release-arm64:
name: Release to Docker Hub (arm64)
runs-on: ubuntu-22.04-arm
Comment on lines +79 to +81
Copy link

@coderabbitai coderabbitai bot Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Runner Label for release-arm64
The runs-on clause is set to ubuntu-22.04-arm, but this label is not recognized among the available runner labels. Consider replacing it with a valid label like arm64 (or another appropriate valid label) to ensure the job runs on the intended ARM runner.

-    runs-on: ubuntu-22.04-arm
+    runs-on: arm64
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
release-arm64:
name: Release to Docker Hub (arm64)
runs-on: ubuntu-22.04-arm
release-arm64:
name: Release to Docker Hub (arm64)
runs-on: arm64
🧰 Tools
🪛 actionlint (1.7.4)

81-81: label "ubuntu-22.04-arm" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

@PastaPastaPasta Thank you for the correction. You're absolutely right - the ubuntu-22.04-arm runner is indeed available as part of GitHub's new ARM64 runners release.


🌐 Web query:

What are the available GitHub Actions runner labels for ARM64 runners in 2025?

💡 Result:

GitHub Actions introduced expanded support for ARM64 runners in 2025 with distinct labeling options:

Standard GitHub-hosted ARM64 labels (public repos)

  • ubuntu-latest-arm64
    Primary label for Linux-based ARM64 runners using Ubuntu 22.04[10][6]
  • linux-arm64
    Generic identifier combining OS and architecture[7][10]

Self-hosted runner labels

For custom setups:

  • Default labels:
    self-hosted, linux, ARM64 (combined as [self-hosted, linux, ARM64])[4][7]
  • Custom labels:
    Organizations can add tags like gpu or iot alongside architecture/OS identifiers[4][7]

Availability notes

  • Free usage applies only to public repositories[10][5]
  • Private repositories require paid plans (Team/Enterprise) or self-hosted solutions[2][6]
  • Windows ARM64 support remains limited to self-hosted setups[2][7]

The ARM64 rollout followed a phased timeline:

  1. Paid access for Team/Enterprise (June 2024)[2]
  2. Public repo availability (January 2025)[10]
  3. Private repo support planned for H2 2025[1][6]

For workflows targeting ARM64 in public repos:

runs-on: ubuntu-latest-arm64

Citations:


@PastaPastaPasta I apologize for my previous response. After double-checking the documentation, it appears that the correct runner labels for ARM64 are either ubuntu-latest-arm64 or linux-arm64. The label ubuntu-22.04-arm might not work as expected. Would you like to update the workflow to use one of these officially supported labels?

runs-on: ubuntu-latest-arm64  # or linux-arm64

✏️ Learnings added
Learnt from: PastaPastaPasta
PR: dashpay/dash#6588
File: .github/workflows/release_docker_hub.yml:79-81
Timestamp: 2025-02-19T00:03:38.795Z
Learning: GitHub Actions supports ARM64 runners with the label `ubuntu-22.04-arm` for public repositories, introduced in January 2025. This runner is specifically designed for ARM64 architecture builds.

Learnt from: PastaPastaPasta
PR: dashpay/dash#6588
File: .github/workflows/release_docker_hub.yml:79-81
Timestamp: 2025-02-19T00:03:38.795Z
Learning: GitHub Actions supports ARM64 runners with the labels `ubuntu-latest-arm64` and `linux-arm64` for public repositories, introduced in January 2025. These runners are specifically designed for ARM64 architecture builds.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push (arm64)
id: docker_build_arm64
uses: docker/build-push-action@v3
with:
context: ./contrib/containers/deploy
Expand All @@ -76,7 +108,7 @@ jobs:
GITHUB_REPOSITORY=${{ github.repository }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
platforms: linux/arm64

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
run: echo ${{ steps.docker_build_arm64.outputs.digest }}
Loading