Skip to content

Add support for arm64 in docker image#1

Draft
npmSteven wants to merge 1 commit intomainfrom
docker-build-arm-support
Draft

Add support for arm64 in docker image#1
npmSteven wants to merge 1 commit intomainfrom
docker-build-arm-support

Conversation

@npmSteven
Copy link
Owner

@npmSteven npmSteven commented Feb 22, 2026

Summary by CodeRabbit

  • Chores
    • Enhanced Docker image build pipeline to support multiple architectures (AMD64 and ARM64).
    • Improved image release process using manifest-based distribution for better cross-platform compatibility.

@github-actions
Copy link

@codex review

@coderabbitai
Copy link

coderabbitai bot commented Feb 22, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docker-build-arm-support

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/docker-publish.yml:
- Around line 58-64: The workflow fails because GitHub Actions expressions don't
have replace(), so change the artifact name usage in the Upload digest step (the
actions/upload-artifact@v4 step where name: digests-${{ replace(matrix.platform,
'/', '-') }}) — either add a small prior step that computes a sanitized platform
variable via shell (e.g., export PLATFORM_NAME="${{ matrix.platform }}" with
parameter substitution to replace "/" with "-" and then reference that env var
in the upload step), or add a platform_name field to the matrix (e.g.,
matrix.include entries) and change the upload step to use ${{
matrix.platform_name }}; update only the Upload digest step and the new matrix
or compute step references accordingly.

Comment on lines +58 to +64
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ replace(matrix.platform, '/', '-') }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

replace() function doesn't exist in GitHub Actions expressions — workflow will fail.

GitHub Actions expressions don't support a replace() function. The available functions are: always, cancelled, contains, endsWith, failure, format, fromJSON, hashFiles, join, startsWith, success, toJSON.

🐛 Proposed fix using shell variable substitution

Add a step to compute the sanitized platform name, then reference it in the upload step:

      - name: Export digest
        run: |
          mkdir -p /tmp/digests
          digest="${{ steps.build.outputs.digest }}"
          touch "/tmp/digests/${digest#sha256:}"
+
+      - name: Prepare platform name
+        id: platform
+        run: |
+          platform="${{ matrix.platform }}"
+          echo "name=${platform//\//-}" >> "$GITHUB_OUTPUT"

      - name: Upload digest
        uses: actions/upload-artifact@v4
        with:
-          name: digests-${{ replace(matrix.platform, '/', '-') }}
+          name: digests-${{ steps.platform.outputs.name }}
          path: /tmp/digests/*
          if-no-files-found: error
          retention-days: 1

Alternatively, since you only have two platforms, you could add platform_name to the matrix:

matrix:
  include:
    - os: ubuntu-latest
      platform: linux/amd64
      platform_name: linux-amd64
    - os: ubuntu-24.04-arm
      platform: linux/arm64
      platform_name: linux-arm64

Then use ${{ matrix.platform_name }} in the artifact name.

🧰 Tools
🪛 actionlint (1.7.11)

[error] 61-61: undefined function "replace". available functions are "always", "cancelled", "case", "contains", "endswith", "failure", "format", "fromjson", "hashfiles", "join", "startswith", "success", "tojson"

(expression)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/docker-publish.yml around lines 58 - 64, The workflow
fails because GitHub Actions expressions don't have replace(), so change the
artifact name usage in the Upload digest step (the actions/upload-artifact@v4
step where name: digests-${{ replace(matrix.platform, '/', '-') }}) — either add
a small prior step that computes a sanitized platform variable via shell (e.g.,
export PLATFORM_NAME="${{ matrix.platform }}" with parameter substitution to
replace "/" with "-" and then reference that env var in the upload step), or add
a platform_name field to the matrix (e.g., matrix.include entries) and change
the upload step to use ${{ matrix.platform_name }}; update only the Upload
digest step and the new matrix or compute step references accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant