Skip to content

fix(#2608): auto-detect digger-os and digger-arch inputs in github ac…#2626

Open
Mallikarjunadevops wants to merge 1 commit intodiggerhq:developfrom
Mallikarjunadevops:feature/issue-2608-auto-detect-os-arch
Open

fix(#2608): auto-detect digger-os and digger-arch inputs in github ac…#2626
Mallikarjunadevops wants to merge 1 commit intodiggerhq:developfrom
Mallikarjunadevops:feature/issue-2608-auto-detect-os-arch

Conversation

@Mallikarjunadevops
Copy link
Copy Markdown

What Resolves #2608.

Currently, action.yml hardcodes its inputs to default to Linux and X64. When users run Digger on non-x86 Linux machines or macOS self-hosted runners (Apple Silicon), the CLI download step fails because it blindly requests the legacy Linux-X64 binary payload without accounting for the actual runner architecture.
This Pull Request introduces auto-detection functionality that gracefully falls back to the native runner.os and runner.arch metrics exclusively when the digger-os or digger-arch inputs are omitted.

How

  • Updated action.yml to set the default value of the OS and Architecture inputs to an empty string "".
  • Added a bash variable-assignment block inside the name: download, install, and run digger step.
  • Mapped GitHub's runner.os (Linux, macOS, Windows) and runner.arch (X64, ARM64, etc.) outputs into their corresponding Golang static binary compilation identifiers (linux, darwin, amd64, arm64, etc.).
  • Backwards compatibility is preserved utilizing strict -z empty-string checks; if a user continues explicitly providing properties to the with: segment on old configurations, auto-detection gracefully yields control.

Testing

  • Performed static bash syntax validation on the modified shell payload snippet to prevent composite action crashes.

Disclosure: I consulted with an AI assistant while writing the implementation for this auto-detect feature.
reviewed and verified manually._

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.

Auto-detect digger-os and digger-arch from runner.os / runner.arch

1 participant