Clarify limitations of `copilot-setup-steps` concerning call of reusable workflows

Aperta Adatta ai principianti
#44,493 3 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
github-actions
Ambito
documentation

Direzione di ricerca

Iniziare con l’articolo collegato customize-the-agent-environment e consultare la relativa documentazione sulla proprietà del job copilot-setup-steps, quindi confrontare i riferimenti a reusable-workflow e composite-action. Documentare che jobs..uses non è supportato, chiarire che inline steps sono supportati e includere la soluzione alternativa con composite-action; verificare che l’articolo venga visualizzato correttamente e che i link rimangano validi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

content copilot never-stale
Code of Conduct
What article on docs.github.com is affected?

https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/customize-the-agent-environment

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

The documentation for copilot-setup-steps does not explicitly state that calling reusable workflows via jobs.<job-id>.uses is not supported. This causes confusion for users who try to extract shared setup logic into a reusable workflow and reference it from the copilot-setup-steps job.

Current behavior

The copilot-setup-steps.yml documentation lists the job-level properties that can be customized (steps, permissions, runs-on, services, snapshot, timeout-minutes). However, it does not explicitly call out that uses at the job level — which is how GitHub Actions reusable workflows are invoked — is not among the supported properties and will be silently ignored or will cause unexpected behavior.

A user might reasonably author:

jobs:
  copilot-setup-steps:
    uses: ./.github/workflows/shared-setup.yml

...expecting the reusable workflow to run as part of Copilot's environment setup, only to find it does not work as intended.

Expected behavior

The documentation should explicitly state that:

  • jobs.<job-id>.uses (reusable workflow calls) is not supported in copilot-setup-steps.
  • Only inline steps are supported; shared setup logic must be inlined or extracted into a composite action (using uses inside a steps entry) rather than a reusable workflow.
Suggested workaround (to be documented)

Instead of a reusable workflow, users can extract shared setup steps into a composite action and reference it within a step:

jobs:
  copilot-setup-steps:
    runs-on: ubuntu-latest
    steps:
      - uses: ./.github/actions/shared-setup  # composite action — supported
References
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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/docs

Tutte le issue di github/docs

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.