Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Clarify vars context availability in composite actions

オープン 初心者向け
#46,232 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

  • #46249 @alok-108 による — マージされずにクローズ

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, typescript
領域
documentation

調査の方向性

issueでリンクされているcontextsのリファレンスとcomposite actionsの記事を読み、次にdocsリポジトリでそれらのページがどのように構成されているか確認してください。composite actionが必要とする値は、varsからの値も含めて、inputsを通じて渡すべきであることを明確にしてください。issueの例を使って、両方のページで説明に一貫性があるか確認してください。

索引モデルが issue の本文から書いたものです。

説明

content
Code of Conduct
What article on docs.github.com is affected?

https://docs.github.com/en/actions/reference/workflows-and-actions/contexts

https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action

What part(s) of the article would you like to see updated?

The documentation is unclear about whether the vars context is available inside composite actions.

The contexts reference lists vars as an available context, which can reasonably lead users to assume that this works inside a composite action:

runs:
  using: composite
  steps:
    - shell: bash
      run: echo "${{ vars.AWS_REGION }}"

However, the Composite Actions ADR states:

"Composite actions should leverage inputs to get values they need, they will not have full access to the context objects."

There is also an implementation detail documented by a runner collaborator in actions/runner#4311: variables are filtered based on references made directly in the calling job, so a vars reference used only inside a composite action may not be available to the runner.

Could the composite actions documentation explicitly clarify that values required by a composite action should be passed through inputs, including values originating from vars?

For example:

- uses: ./my-action
  with:
    region: ${{ vars.AWS_REGION }}

and then inside the composite action:

${{ inputs.region }}

This would make the relationship between the general contexts documentation and the more limited context availability of composite actions clearer.

Thanks

Additional information

No response

主要言語
TypeScript
スター
21k
フォーク
69k
平均マージ
9時間 42分
マージ済み PR(30日)
110

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/docs のほかの issue

github/docs の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。