From 9027947d0afdd847b6f99ebac9e72a67079b23bc Mon Sep 17 00:00:00 2001 From: Kevin Stillhammer Date: Mon, 24 Nov 2025 09:04:22 +0100 Subject: [PATCH 1/2] Test action on all runner types --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49a79e2..44c4909 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: test: strategy: matrix: - runner: [ubuntu-slim, ubuntu-latest] + runner: [ubuntu-slim, ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest] runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v5 @@ -38,4 +38,4 @@ jobs: with: ssh-private-key: ${{ secrets.CI_DEPLOY_KEY_PRIVATE_KEY }} fetch-github-host-keys: ${{ matrix.runner == 'ubuntu-slim' }} - - run: git clone git@github.com:tadodotcom/ssh-agent.git /tmp/ssh-agent-clone \ No newline at end of file + - run: git clone git@github.com:tadodotcom/ssh-agent.git ssh-agent-clone From 645b668fc6bb58452b9422d8f278888fb9c9afe9 Mon Sep 17 00:00:00 2001 From: Kevin Stillhammer Date: Mon, 24 Nov 2025 09:10:39 +0100 Subject: [PATCH 2/2] Support fetch-github-host-keys on windows runners --- .github/workflows/ci.yml | 2 +- dist/index.js | 11 +++++++---- index.js | 11 +++++++---- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44c4909..e952493 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,5 +37,5 @@ jobs: - uses: ./ with: ssh-private-key: ${{ secrets.CI_DEPLOY_KEY_PRIVATE_KEY }} - fetch-github-host-keys: ${{ matrix.runner == 'ubuntu-slim' }} + fetch-github-host-keys: ${{ matrix.runner == 'ubuntu-slim' || matrix.runner == 'windows-latest' }} - run: git clone git@github.com:tadodotcom/ssh-agent.git ssh-agent-clone diff --git a/dist/index.js b/dist/index.js index 5f871f9..e569738 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3697,10 +3697,13 @@ try { if (fetchGithubHostKeys) { console.log("Fetching GitHub host keys"); try { - const metaJson = child_process.execSync( - "curl --silent https://api.github.com/meta", - { encoding: "utf8" }, - ); + // Use curl which is available on all GitHub Actions runners (Linux, macOS, Windows) + const curlCmd = + process.platform === "win32" + ? "curl.exe --silent https://api.github.com/meta" + : "curl --silent https://api.github.com/meta"; + + const metaJson = child_process.execSync(curlCmd, { encoding: "utf8" }); const meta = JSON.parse(metaJson); const knownHostsFile = `${homeSsh}/known_hosts`; diff --git a/index.js b/index.js index e754a3f..9d421ed 100644 --- a/index.js +++ b/index.js @@ -29,10 +29,13 @@ try { if (fetchGithubHostKeys) { console.log("Fetching GitHub host keys"); try { - const metaJson = child_process.execSync( - "curl --silent https://api.github.com/meta", - { encoding: "utf8" }, - ); + // Use curl which is available on all GitHub Actions runners (Linux, macOS, Windows) + const curlCmd = + process.platform === "win32" + ? "curl.exe --silent https://api.github.com/meta" + : "curl --silent https://api.github.com/meta"; + + const metaJson = child_process.execSync(curlCmd, { encoding: "utf8" }); const meta = JSON.parse(metaJson); const knownHostsFile = `${homeSsh}/known_hosts`;