actions / actions/runner

Composite actions can't see or use org or repo vars

Open
#2,551 6 comments 49 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Describe the bug
Composite actions can't see org or repo vars.

To Reproduce
Steps to reproduce the behavior:

  1. Create a composite action
  2. Use the vars context somewhere.
  3. Use composite action
  4. See error Unrecognized named-value: 'vars'.

Expected behavior
Expected composite actions to be able to read org/repo variables.

Runner Version and Platform

Ubuntu latest.

OS of the machine running the runner? Ubuntu

What's not working?

Error: /runner/_work/xxx/xxx/./scripts/github-actions/deploy/exec-deployment/action.yml (Line: 34, Col: 11): Unrecognized named-value: 'vars'. Located at position 29 within expression: env.ENV != 'prod' && !vars.ALLOW

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure in the composite action at scripts/github-actions/deploy/exec-deployment/action.yml, especially the vars expression reported at line 34, using an Ubuntu runner. Trace how the runner evaluates vars in composite actions; done means org and repository variables can be read there without the Unrecognized named-value error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, github-actions
Domain
ci-cd, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.