Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Random GITHUB_OUTPUT: unbound variable in get-sha.sh #690

Closed
3 tasks done
neerup opened this issue Oct 14, 2022 · 4 comments · Fixed by #691
Closed
3 tasks done

[BUG] Random GITHUB_OUTPUT: unbound variable in get-sha.sh #690

neerup opened this issue Oct 14, 2022 · 4 comments · Fixed by #691
Labels
bug Something isn't working

Comments

@neerup
Copy link

neerup commented Oct 14, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I'm using the latest release

Describe the bug?

Im getting random errors like this in my workflows on push
Rerunning the workflow usually resolves the problem

Run # "Calculate the sha..."
  # "Calculate the sha..."
  bash $GITHUB_ACTION_PATH/get-sha.sh
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/8.0.345-1/x64
    JAVA_HOME_8_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/8.0.345-1/x64
    GITHUB_WORKSPACE: /runner/_work/xxxx/xxxx
    INPUT_UNTIL: 
    INPUT_SHA: [43](https://github.com/****/actions/runs/3248434594/jobs/5329639214#step:6:45)94035c9769e1c5dcd7870ef4cb2ab4d5f7b996
    INPUT_PATH: .
/runner/_work/_actions/tj-actions/changed-files/v32/get-sha.sh: line 23: GITHUB_OUTPUT: unbound variable
Resolving repository path: /runner/_work/xxxx/xxxx/.
Error: Process completed with exit code 1.

logs_505.zip

To Reproduce

Self hosted runner

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-20.04

Expected behavior?

Not to fail

Relevant log output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@neerup neerup added the bug Something isn't working label Oct 14, 2022
@jackton1
Copy link
Member

@neerup See: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Particularly if you are using self-hosted runners make sure they are updated to version 2.297.0 or greater.

@mnmaita
Copy link

mnmaita commented Oct 14, 2022

@jackton1 I've seen a recent PR that switches to $GITHUB_OUTPUT and I saw it being appended to with double quotation marks, like >> "$GITHUB_OUTPUT". Is this correct?

I'm pretty sure we're running >=2.298.2 in our self hosted runners.

@jackton1
Copy link
Member

@jackton1 I've seen a recent PR that switches to $GITHUB_OUTPUT and I saw it being appended to with double quotation marks, like >> "$GITHUB_OUTPUT". Is this correct?

I'm pretty sure we're running >=2.298.2 in our self hosted runners.

Yes, the use of double quotation marks is valid and is used to prevent globbing or word splitting in shell scripts.

See: https://www.shellcheck.net/wiki/SC2086

@jackton1
Copy link
Member

@neerup @mnmaita @cgooderham94 This should be resolved in the latest release.

NOTE: No action is required on your part as the changes are also available in the latest v32 major version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants