Skip to content

Support Windows and Mac #284

@ffMathy

Description

@ffMathy

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/ci@v0.3.1900000347
        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/ci@v0.3.1900000347' (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/ci@v0.3.1900000347
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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions