question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Composite actions conditionals does not work on self hosted runner Latest version

See original GitHub issue

Describe the bug

  • We are using self hosted runners which is on version 2.285.1 . We are trying to use conditionals in composite actions and it does not work . When we try the same steps on github hosted runner it works

To Reproduce Steps to reproduce the behavior:

  1. Create a Composite action that has conditionals based on success /failure of previous step
  2. Run

Expected behavior

Conditional steps should run

Runner Version and Platform

2.285.1 - ubuntu

OS of the machine running the runner? OSX/Windows/Linux/…

What’s not working?

It fails at the conditional step

Job Log Output

If applicable, include the relevant part of the job / step log output here. All sensitive information should already be masked out, but please double-check before pasting here.

Runner and Worker’s Diagnostic Logs

If applicable, add relevant diagnostic log information. Logs are located in the runner’s _diag folder. The runner logs are prefixed with Runner_ and the worker logs are prefixed with Worker_. Each job run correlates to a worker log. All sensitive information should already be masked out, but please double-check before pasting here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dang113108commented, Apr 13, 2022

Hi @thboop , we get the same issue here. Run composite actions on self-hosted runner with if conditionals and sometimes it’ll get the error.

The error logs:

Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 51, Col: 7): Unexpected value 'if'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 82, Col: 7): Unexpected value 'uses'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 83, Col: 7): Unexpected value 'with'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 81, Col: 7): Required property is missing: run
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 81, Col: 7): Required property is missing: shell
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 90, Col: 7): Unexpected value 'uses'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 91, Col: 7): Unexpected value 'with'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 88, Col: 7): Required property is missing: run
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 88, Col: 7): Required property is missing: shell
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 139, Col: 7): Unexpected value 'uses'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 140, Col: 7): Unexpected value 'with'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 138, Col: 7): Required property is missing: run
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 138, Col: 7): Required property is missing: shell
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 146, Col: 7): Unexpected value 'uses'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 147, Col: 7): Unexpected value 'with'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 145, Col: 7): Required property is missing: run
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 145, Col: 7): Required property is missing: shell
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 154, Col: 7): Unexpected value 'uses'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 155, Col: 7): Unexpected value 'with'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 153, Col: 7): Required property is missing: run
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 153, Col: 7): Required property is missing: shell
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 166, Col: 7): Unexpected value 'if'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 167, Col: 7): Unexpected value 'uses'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 168, Col: 7): Unexpected value 'with'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 165, Col: 7): Required property is missing: run
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 165, Col: 7): Required property is missing: shell
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 179, Col: 7): Unexpected value 'uses'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 180, Col: 7): Unexpected value 'with'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 178, Col: 7): Required property is missing: run
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 178, Col: 7): Required property is missing: shell
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 51, Col: 7): Unexpected value 'if'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 82, Col: 7): Unexpected value 'uses'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 83, Col: 7): Unexpected value 'with'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 81, Col: 7): Required property is missing: run
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 81, Col: 7): Required property is missing: shell
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 90, Col: 7): Unexpected value 'uses'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 91, Col: 7): Unexpected value 'with'
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 88, Col: 7): Required property is missing: run
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 88, Col: 7): Required property is missing: shell
Error: /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml (Line: 139, Col: 7): Unexpected value 'uses'
Error: Fail to load /runner/_work/<repo_name>/<repo_name>/./.github/actions/<actions_name>/action.yml

@ashajoy @phasebash Do you found some solution for that?

Thanks!

0reactions
thboopcommented, Mar 21, 2022

This should be working on the latest runner version, are you still running into issues.

We now correctly set outputs for each composite step, and we have shipped if support for composite actions. I don’t really understand the bug reported here, does anyone have a reproduction? If so, please comment in this issue and i’ll reopen it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using self-hosted runners in a workflow
You can target self-hosted runners for use in a workflow based on the labels assigned to the runners, or their group membership, or...
Read more >
How to use composite custom action in a self-hosted ...
The problem was in the composite YAML action. It seems to be related to the use of double quotes. I refactored my YAML,...
Read more >
GitHub Actions Limitations and Gotchas - cbui.dev
A lot of times, the self-hosted runners will be containerized. Containerized runners won't persist dependencies, docker images, etc., between ...
Read more >
GitHub Actions Security Best Practices [cheat sheet included]
From controlling credentials to using specific action version tags, this cheat sheet will help you protect against supply-chain attacks.
Read more >
GitHub Actions: New runner release v2.272.0
We have released a new version of the GitHub Actions runner. Features. Composite Actions Support for Multiple Run Steps (#549, #557, #564, #568, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found