-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (59 loc) · 1.61 KB
/
ci.yml
File metadata and controls
67 lines (59 loc) · 1.61 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
actions: read
jobs:
build:
runs-on: ubuntu-latest
name: Build and Validate
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Lint Dockerfile
uses: hadolint/hadolint-action@v3.3.0
with:
dockerfile: .devcontainer/Dockerfile
- name: Check for secrets
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: |
docker build -t dev-template:latest .devcontainer/
test:
runs-on: ubuntu-latest
name: Test Devcontainer
needs: build
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Test devcontainer functionality
uses: devcontainers/ci@v0.3
with:
push: never
runCmd: |
# Test basic tools are available
which python3 || echo "python3 is missing"
which pip3 || echo "pip3 is missing"
which docker || echo "docker is missing"
which gh || echo "gh is missing"
which node || echo "node is missing"
which npm || echo "npm is missing"
which claude || echo "claude is missing"
# Test essential packages
python3 --version
node --version
docker --version
gh --version
claude --version
curl --version
jq --version