ci
ci copied to clipboard
Support Windows and Mac
We want to validate our DevContainer as part of the build, since we've sometimes found differences among Windows and Mac in our DevContainers.
on:
workflow_dispatch: {}
push:
paths:
- .devcontainer/**
jobs:
validate:
name: Validate on ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform:
- ubuntu-latest
- windows-latest
- macos-latest
steps:
- name: Setup Docker
uses: docker-practice/actions-setup-docker@master
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Execute DevContainer commands
uses: devcontainers/[email protected]
with:
runCmd: |
echo "hello world"
But on Windows, we get the following error:
Prepare all required actions
Getting action download info
Download action repository 'devcontainers/[email protected]' (SHA:691[2](https://github.com/redacted/redacted/actions/runs/8262928689/job/22603298366#step:5:2)4f15[3](https://github.com/redacted/redacted/actions/runs/8262928689/job/22603298366#step:5:3)1ff[4](https://github.com/redacted/redacted/actions/runs/8262928689/job/22603298366#step:5:4)1e7216e9eae6654a740189e4bda)
Run devcontainers/[email protected]
Starting...
Installing @devcontainers/cli...
** Installing @devcontainers/cli
"C:\Program Files\Git\bin\bash.exe" -c "npm install -g @devcontainers/cli@0"
added 1 package in 8s
Adding --cache-from ghcr.io/redacted/redacted-dev-container:latest to build args
🏗️ build container
About to run devcontainer build --workspace-folder D:\a\redacted\redacted --image-name ghcr.io/redacted/redacted-dev-container:latest --cache-from ghcr.io/redacted/redacted-dev-container:latest --cache-from ghcr.io/lego/redacted-redacted-container
Error: spawn devcontainer ENOENT