ssh-compute
ssh-compute copied to clipboard
Already: command not found
TL;DR
I don’t know why the echo is output as a command, but the return is an error, which makes github Actions fail to succeed
Expected behavior
No response
Observed behavior
Run echo /my/path echo /my/path
echo Updating project ssh metadata... .........................................................................................................failed. env: CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE: jsonfile.json GOOGLE_APPLICATION_CREDENTIALS: jsonfile.json GOOGLE_GHA_CREDS_PATH: jsonfile.json CLOUDSDK_CORE_PROJECT: speedy-cargo-130908 CLOUDSDK_PROJECT: speedy-cargo-130908 GCLOUD_PROJECT: speedy-cargo-130908 GCP_PROJECT: speedy-cargo-130908 GOOGLE_CLOUD_PROJECT: speedy-cargo-130908 CLOUDSDK_METRICS_ENVIRONMENT: github-actions-ssh-compute GOOGLE_GHA_SSH_KEYS_TEMP_DIR: /tmp/0e0b413cc0ffd7aaed1ca9ec /my/path /home/runner/work/_temp/68da171d-d780-4b3b-bb90-a8243e90b394.sh: line 2: Already: command not found Error: Process completed with exit code 127.
Action YAML
name: deploy
on:
push:
branches:
- cicd-test
jobs:
gitpull:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- id: auth
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
- id: ssh
uses: google-github-actions/ssh-compute@v0
with:
instance_name: user
user: user
zone: asia-east1-a
ssh_private_key: ${{ secrets.TEST_SSH_PPK_KEY }}
command: pwd && cd /my/path
- id: stdmsg
run: |-
echo ${{ steps.ssh.outputs.stdout }}
echo ${{ steps.ssh.outputs.stderr }}
Log output
/home/runner/work/_temp/68da171d-d780-4b3b-bb90-a8243e90b394.sh: line 2: Already: command not found
Error: Process completed with exit code 127.
Additional information
No response