Bump @types/node from 25.6.0 to 26.0.0 #36
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] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create stub files required by devcontainer bind mounts | |
| run: | | |
| # SSH auth socket — no agent on CI runners | |
| touch /tmp/ssh-agent.sock | |
| echo "SSH_AUTH_SOCK=/tmp/ssh-agent.sock" >> $GITHUB_ENV | |
| # git config — may not exist on a fresh runner | |
| touch "${HOME}/.gitconfig" | |
| - name: Compute lowercase image name | |
| id: image_name | |
| run: echo "value=ghcr.io/$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')/devcontainer" >> $GITHUB_OUTPUT | |
| - name: Warm layer cache (skip on first run when image does not exist yet) | |
| id: cache | |
| run: | | |
| IMAGE="${{ steps.image_name.outputs.value }}" | |
| if docker pull "${IMAGE}:latest" 2>/dev/null; then | |
| echo "from=${IMAGE}" >> $GITHUB_OUTPUT | |
| else | |
| echo "from=" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Build Dev Container and run tests | |
| uses: devcontainers/ci@v0.3 | |
| with: | |
| imageName: ${{ steps.image_name.outputs.value }} | |
| # Non-empty only after the first successful push; BuildKit skips --cache-from | |
| # when this is blank, avoiding the "not found" hard error introduced in BuildKit 0.12. | |
| cacheFrom: ${{ steps.cache.outputs.from }} | |
| # This is the same command developers run locally. No translation required. | |
| runCmd: npm test | |
| # Only publish the validated image on pushes to main. | |
| # PR builds warm the cache but do not push. | |
| - name: Push SHA-tagged image to GHCR | |
| if: github.ref == 'refs/heads/main' && success() | |
| run: | | |
| docker tag \ | |
| ${{ steps.image_name.outputs.value }}:latest \ | |
| ${{ steps.image_name.outputs.value }}:${{ github.sha }} | |
| docker push ${{ steps.image_name.outputs.value }}:latest | |
| docker push ${{ steps.image_name.outputs.value }}:${{ github.sha }} |