forked from kubernetes-sigs/kubebuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1012 Bytes
/
test-devcontainer.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Test DevContainer Image
on:
push:
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- '**/*.md'
jobs:
test-devcontainer:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go 1.22.x
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Setup NodeJS 20.x
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Setup Devcontainer CLI
run: |
npm install -g @devcontainers/cli
- name: Build and Validate DevContainer
run: |
cd testdata/project-v4
OUTPUT=$(devcontainer up --workspace-folder=./)
STATUS=$(echo "$OUTPUT" | jq -r '.outcome')
if [[ "$STATUS" == "success" ]]; then
echo "Devcontainer setup was successful."
exit 0
else
echo "Devcontainer setup failed."
exit 1
fi