Files
dotnet__skills/.github/workflows/shared/pat_pool.md
Jeff Handley 11c5dfc738 Require environment input to pat_pool shared workflow. (#832)
* Require environment input to pat_pool shared workflow.

- Updates the PAT pool shared workflow to latest version
- Updates the validate-pat-pool workflow to match other repos
- Updates all agentic workflows to use the updated PAT pool import
  with the standard secret names used across other repos
- The new version of the import does not require the 'needs' workaround
  but the issue-triage workflow's 'roles: all' configuration requires
  a different workaround to ensure the pre_activation job exists for
  the pat_pool job to be able to depend on it (necessary for ordering).

* Update markdown bullet style

* Apply Copilot PR feedback

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Bump versions to match gh-aw

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-25 15:35:22 -07:00

4.0 KiB
Raw Permalink Blame History

description, jobs, import-schema
description jobs import-schema
Agentic workflow import to integrate the Copilot PAT Pool
pat_pool
environment needs runs-on outputs steps
${{ github.aw.import-inputs.environment }}
pre_activation
ubuntu-slim
pat_number
${{ steps.select-pat-number.outputs.copilot_pat_number }}
id name env shell run
select-pat-number Select Copilot token from pool
COPILOT_PAT_0 COPILOT_PAT_1 COPILOT_PAT_2 COPILOT_PAT_3 COPILOT_PAT_4 COPILOT_PAT_5 COPILOT_PAT_6 COPILOT_PAT_7 COPILOT_PAT_8 COPILOT_PAT_9 RANDOM_SEED
${{ github.aw.import-inputs.COPILOT_PAT_0 }} ${{ github.aw.import-inputs.COPILOT_PAT_1 }} ${{ github.aw.import-inputs.COPILOT_PAT_2 }} ${{ github.aw.import-inputs.COPILOT_PAT_3 }} ${{ github.aw.import-inputs.COPILOT_PAT_4 }} ${{ github.aw.import-inputs.COPILOT_PAT_5 }} ${{ github.aw.import-inputs.COPILOT_PAT_6 }} ${{ github.aw.import-inputs.COPILOT_PAT_7 }} ${{ github.aw.import-inputs.COPILOT_PAT_8 }} ${{ github.aw.import-inputs.COPILOT_PAT_9 }} ${{ github.aw.import-inputs.random_seed }}
bash # Collect pool entries with non-empty secrets from COPILOT_PAT_0..COPILOT_PAT_9. PAT_NUMBERS=() POOL_INDICATORS=(➖ ➖ ➖ ➖ ➖ ➖ ➖ ➖ ➖ ➖) for i in $(seq 0 9); do var="COPILOT_PAT_${i}" val="${!var}" if [ -n "$val" ]; then PAT_NUMBERS+=(${i}) POOL_INDICATORS[${i}]="🟪" fi done # If none of the entries in the pool have values, emit a warning # and do not set an output value. The consumer can fall back to # using COPILOT_GITHUB_TOKEN. if [ ${#PAT_NUMBERS[@]} -eq 0 ]; then warning_message="::warning::None of the PAT pool entries had values " warning_message+="(checked COPILOT_PAT_0 through COPILOT_PAT_9)" echo "$warning_message" exit 0 fi # Select a random index using the seed if specified if [ -n "$RANDOM_SEED" ]; then RANDOM=$RANDOM_SEED fi PAT_INDEX=$(( RANDOM % ${#PAT_NUMBERS[@]} )) PAT_NUMBER="${PAT_NUMBERS[$PAT_INDEX]}" POOL_INDICATORS[${PAT_NUMBER}]="✅" echo "Pool size: ${#PAT_NUMBERS[@]}" echo "Selected PAT number ${PAT_NUMBER} (index: ${PAT_INDEX})" # Emit a markdown table of the pool entries to the step summary echo "|0|1|2|3|4|5|6|7|8|9|" >> "$GITHUB_STEP_SUMMARY" echo "|-|-|-|-|-|-|-|-|-|-|" >> "$GITHUB_STEP_SUMMARY" (IFS='|'; printf '|%s' "${POOL_INDICATORS[@]}"; printf '|\n') >> "$GITHUB_STEP_SUMMARY" # Set the PAT number as the output echo "copilot_pat_number=${PAT_NUMBER}" >> "$GITHUB_OUTPUT"
environment COPILOT_PAT_0 COPILOT_PAT_1 COPILOT_PAT_2 COPILOT_PAT_3 COPILOT_PAT_4 COPILOT_PAT_5 COPILOT_PAT_6 COPILOT_PAT_7 COPILOT_PAT_8 COPILOT_PAT_9 random_seed
type required
string true
type required default
string false ${{ secrets.COPILOT_PAT_0 }}
type required default
string false ${{ secrets.COPILOT_PAT_1 }}
type required default
string false ${{ secrets.COPILOT_PAT_2 }}
type required default
string false ${{ secrets.COPILOT_PAT_3 }}
type required default
string false ${{ secrets.COPILOT_PAT_4 }}
type required default
string false ${{ secrets.COPILOT_PAT_5 }}
type required default
string false ${{ secrets.COPILOT_PAT_6 }}
type required default
string false ${{ secrets.COPILOT_PAT_7 }}
type required default
string false ${{ secrets.COPILOT_PAT_8 }}
type required default
string false ${{ secrets.COPILOT_PAT_9 }}
type required description
number false A seed number to use for the random PAT number selection, for deterministic selection if needed.