Skip to content

Skip validate job when skill matrix is empty#183

Merged
rajbos merged 2 commits intomainfrom
copilot/add-check-to-skip-matrix
Feb 7, 2026
Merged

Skip validate job when skill matrix is empty#183
rajbos merged 2 commits intomainfrom
copilot/add-check-to-skip-matrix

Conversation

Copy link
Contributor

Copilot AI commented Feb 7, 2026

GitHub Actions fails when the skill matrix vector contains no values. This occurs when no .github/skills/** files are modified in a push/PR.

Changes

  • Uncommented if: needs.detect-changes.outputs.skills != '[]' condition in validate job
  • Job now skips instead of failing when matrix is empty
validate:
  needs: detect-changes
  if: needs.detect-changes.outputs.skills != '[]'  # Previously commented out
  runs-on: ubuntu-latest
  strategy:
    matrix:
      skill: ${{ fromJson(needs.detect-changes.outputs.skills) }}

The condition was already present but commented out. This change activates it to prevent matrix evaluation errors.

Original prompt

See the logs in run https://github.com/rajbos/github-copilot-token-usage/actions/runs/21785946769

We get this message in the matrix config, which currently fails the run. it isfine if the matrix is empty, that just means we can skip the matrix itself.

add a check of if statement that will skip the matrix then, instead of causing the failure

Annotations
2 errors
Validate Skills
Error when evaluating 'strategy' for job 'validate'. .github/workflows/validate-skills.yml (Line: 68, Col: 16): Matrix vector 'skill' does not contain any values
Validate Skills
Error when evaluating 'strategy' for job 'validate'. .github/workflows/validate-skills.yml (Line: 68, Col: 16): Matrix vector 'skill' does not contain any values


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Copilot AI changed the title [WIP] Add check to skip empty matrix configuration Skip validate job when skill matrix is empty Feb 7, 2026
Copilot AI requested a review from rajbos February 7, 2026 21:41
@rajbos rajbos marked this pull request as ready for review February 7, 2026 21:43
@rajbos rajbos merged commit a123b06 into main Feb 7, 2026
@rajbos rajbos deleted the copilot/add-check-to-skip-matrix branch February 7, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments