Add GitHub Copilot CLI installation by default #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| actions: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| name: Build and Validate | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install missing dependencies | |
| run: sudo apt-get update && sudo apt-get install -y tcl | |
| - name: Check Docker Compose file existence | |
| run: test -f .devcontainer/docker-compose.yml && echo "Docker Compose file exists" | |
| - name: Validate docker-compose.yml | |
| run: docker compose -f .devcontainer/docker-compose.yml config | |
| - name: Lint Dockerfile | |
| uses: hadolint/[email protected] | |
| with: | |
| dockerfile: .devcontainer/Dockerfile | |
| - name: Check for secrets | |
| uses: gitleaks/gitleaks-action@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build Docker image | |
| run: | | |
| docker build -t dev-template:latest .devcontainer/ | |
| test: | |
| runs-on: ubuntu-latest | |
| name: Test Devcontainer | |
| needs: build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install missing dependencies | |
| run: sudo apt-get update && sudo apt-get install -y tcl | |
| - name: Check Docker Compose version | |
| run: docker compose version | |
| - name: Test devcontainer functionality | |
| uses: devcontainers/[email protected] | |
| with: | |
| push: never | |
| runCmd: | | |
| # Test basic tools are available | |
| which tclsh || echo "tclsh is missing" | |
| which docker || echo "docker is missing" | |
| which kubectl || echo "kubectl is missing" | |
| which helm || echo "helm is missing" | |
| which gh || echo "gh is missing" | |
| which node || echo "node is missing" | |
| which npm || echo "npm is missing" | |
| # Test essential packages | |
| curl --version | |
| jq --version |