Skip to content

bash: /data/runner/work/_temp/AZ_CLI_GITHUB_ACTION_<timestamp>.sh: No such file or directory #161

@FlorentATo

Description

@FlorentATo

Workflow

(...)
    - name: Azure CLI script to copy artifact
      uses: azure/cli@v2
      with:
        azcliversion: latest
        inlineScript: |
          az storage blob upload --account-name REDACTED  --container-name REDACTED  --name target_file_name --file ${{inputs.file_path}}/${{inputs.file}} --auth-mode login

Error logs:

Run azure/cli@v2
Starting script execution via docker image mcr.microsoft.com/azure-cli:latest
Error: Error: Unable to find image 'mcr.microsoft.com/azure-cli:latest' locally
latest: Pulling from azure-cli
c6a83fedfae6: Already exists
b9dc4119f2ec: Pulling fs layer
545d94f91829: Pulling fs layer
4271f5ef1d39: Pulling fs layer
780f71a86072: Pulling fs layer
860a1e8f6d7f: Pulling fs layer
4f4fb700ef54: Pulling fs layer
780f71a86072: Waiting
4f4fb700ef54: Waiting
860a1e8f6d7f: Waiting
4271f5ef1d39: Verifying Checksum
4271f5ef1d39: Download complete
b9dc4119f2ec: Download complete
b9dc4119f2ec: Pull complete
545d94f91829: Verifying Checksum
545d94f91829: Download complete
780f71a86072: Verifying Checksum
780f71a86072: Download complete
4f4fb700ef54: Verifying Checksum
4f4fb700ef54: Download complete
545d94f91829: Pull complete
4271f5ef1d39: Pull complete
780f71a86072: Pull complete
860a1e8f6d7f: Verifying Checksum
860a1e8f6d7f: Download complete
860a1e8f6d7f: Pull complete
4f4fb700ef54: Pull complete
Digest: sha256:38f8385bb27f9b6dabee3045852cabce2e9da7d4ed35d5783b4691a02489b4c2
Status: Downloaded newer image for mcr.microsoft.com/azure-cli:latest
bash: /data/runner/work/_temp/AZ_CLI_GITHUB_ACTION_1724872531969.sh: No such file or directory

cleaning up container...
MICROSOFT_AZURE_CLI_1724872531842_CONTAINER

Runner: Self-hosted (on-prem, physical server running Ubuntu 22.04.3 LTS)
GitHub Runner version: 2.319.1

Hypothesis: It seems like createScriptFile (more specifically fs.writeFileSync) silently fails to write to its container's filesystem.

Proposed fix: Add validation step to validate 1) the file is present and 2) has the execution bit set.

Metadata

Metadata

Assignees

Labels

questionRequiring some clarification

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions