name: "Copilot Setup Steps" # This workflow configures the environment for GitHub Copilot Agent with gh-aw MCP server on: workflow_dispatch: push: paths: - .github/workflows/copilot-setup-steps.yml jobs: # The job MUST be called 'copilot-setup-steps' to be recognized by GitHub Copilot Agent copilot-setup-steps: runs-on: ubuntu-latest # Set minimal permissions for setup steps # Copilot Agent receives its own token with appropriate permissions permissions: contents: read steps: # Clone the repository - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # Install GitHub CLI and gh-aw extension for Copilot Agent interaction - name: Install gh-aw extension uses: github/gh-aw/actions/setup-cli@7a970851c1090295e55a16e549c61ba1ce227f16 # v0.42.17 with: version: v0.42.17 # Setup Node.js - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 with: node-version: 22 # Set up JDK 17 - name: Set up JDK 17 uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 with: java-version: '17' distribution: 'temurin' cache: 'maven' # Enable repository pre-commit hooks (including Spotless checks for relevant source changes) - name: Enable pre-commit hooks run: git config core.hooksPath .githooks # Verify installations - name: Verify tool installations run: | echo "=== Verifying installations ===" node --version npm --version java -version gh --version gh aw version echo "--- Git hooks path ---" git config core.hooksPath echo "✅ All tools installed successfully"