Inconsistent allowed contexts for reusable workflow secrets/inputs
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
- Tipo di issue
- Documentazione
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- markdown
- Ambito
- documentation
Direzione di ricerca
Inizia confrontando actions/reference/workflows-and-actions/contexts.md con actions/reference/workflows-and-actions/reusable-workflows.md, concentrandoti sulle voci jobs.<job_id>.secrets.<secret_id> e jobs.<job_id>.with.<input_id>. Determina i contesti consentiti documentati e allinea i nomi delle chiavi del workflow in modo che entrambe le pagine descrivano lo stesso comportamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Code of Conduct
- I have read and agree to the GitHub Docs project's 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/reference/workflows-and-actions/reusable-workflows
What part(s) of the article would you like to see updated?
I have found inconsistencies between the actions/reference/workflows-and-actions/contexts.md and the actions/reference/workflows-and-actions/reusable-workflows.md pages.
The reusable-workflows.md page defines contexts for jobs.<job_id>.secrets.<secret_id> and jobs.<job_id>.with.<input_id> like so:
## `jobs.<job_id>.with.<input_id>`
[...]
Allowed expression contexts: `github`, and `needs`.
## `jobs.<job_id>.secrets.<secret_id>`
[...]
Allowed expression contexts: `github`, `needs`, and `secrets`.
This seems to match observed behavior that the following using After testing in a different and cleaner environment, this actually does not match the observed behavior, as the following using vars, using a reusable workflow that requires a secret, does not work:vars, using a reusable workflow that requires a secret, does work:
jobs:
job:
uses: job.yml
secrets:
MY_SECRET: ${{ vars.MY_SECRET }}
Indeed, the contexts.md page defines these contexts like so:
| `jobs.<job_id>.secrets.<secrets_id>` | `github, needs, strategy, matrix, secrets, inputs, vars` | None |
| `jobs.<job_id>.with.<with_id>` | `github, needs, strategy, matrix, inputs, vars` | None |
So I would have expected vars to work in this context, but it does not.
Also while we are at it, note the workflow keys are not consistent: secrets_id vs secret_id, and with_id vs input_id.
Therefore I would suggest to:
- Rename the workflow keys in the
contexts.mdpage to match those in thereusable-workflows.mdpage, - Update the "allowed expression contexts" in the
reusable-workflows.mdpage to match what is described in thecontexts.mdpage.
Additional information
No response
- Lingua principale
- TypeScript
- Stelle
- 20.9k
- Fork
- 68.8k
- Merge medio
- 15h 4m
- PR unite (30g)
- 103
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/docs
-
builder persona content
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
localization
Difficoltà 2/5 1-2 giorni Idoneità per principianti 72/100
-
builder persona
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
content localization
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
content localization
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Apertabug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
calcite-components needs triage refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Esri/calcite-design-system#15203 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
fullcalendar/fullcalendar#8106 ·