Skip to content

Commit 521e2ec

Browse files
committed
(ci): GH Actions to build an test prebuilt devcontainers
1 parent b5fc836 commit 521e2ec

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

.github/workflows/main.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ on:
55
branches: [ main, develop ]
66
paths:
77
- '.devcontainer/**'
8-
- '.github/workflows/devcontainer-test.yml'
8+
- '.github/workflows/main.yml'
99
pull_request:
1010
paths:
1111
- '.devcontainer/**'
12-
- '.github/workflows/devcontainer-test.yml'
12+
- '.github/workflows/main.yml'
1313
workflow_dispatch:
1414

1515
jobs:
@@ -26,22 +26,23 @@ jobs:
2626
- name: Checkout repository
2727
uses: actions/checkout@v4
2828

29-
- name: Check devcontainer folder exists
29+
- name: Check devcontainer config exists
3030
id: check
3131
run: |
32-
if [ -d "${{ matrix.subFolder }}" ]; then
32+
if [ -f "${{ matrix.subFolder }}/devcontainer.json" ]; then
3333
echo "exists=true" >> $GITHUB_OUTPUT
3434
else
3535
echo "exists=false" >> $GITHUB_OUTPUT
36-
echo "Skipping: ${{ matrix.subFolder }} does not exist."
36+
echo "Skipping: ${{ matrix.subFolder }}/devcontainer.json does not exist."
3737
fi
3838
3939
- name: Build and run devcontainer
4040
if: steps.check.outputs.exists == 'true'
4141
uses: devcontainers/ci@v0.3
4242
with:
4343
subFolder: ${{ matrix.subFolder }}
44-
# Simple smoke test command executed inside the running devcontainer
44+
configFile: ${{ matrix.subFolder }}/devcontainer.json
45+
4546
runCmd: echo "Devcontainer OK in ${{ matrix.subFolder }}" && uname -a
4647
push: never
4748

0 commit comments

Comments
 (0)