-
Notifications
You must be signed in to change notification settings - Fork 7
46 lines (39 loc) · 1.34 KB
/
Copy pathdevcontainer.yml
File metadata and controls
46 lines (39 loc) · 1.34 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
name: Devcontainer
on:
push:
branches: [main]
paths:
- ".devcontainer/**"
- ".github/workflows/devcontainer.yml"
pull_request:
branches: [main]
paths:
- ".devcontainer/**"
- ".github/workflows/devcontainer.yml"
workflow_dispatch:
inputs:
runCmd:
description: "Command to run inside the devcontainer"
required: false
default: for c in go task prek uv node; do command -v "$c" >/dev/null 2>&1 || { echo "missing $c" >&2; exit 1; }; done
permissions:
contents: read
env:
DEFAULT_RUN_CMD: for c in go task prek uv node; do command -v "$c" >/dev/null 2>&1 || { echo "missing $c" >&2; exit 1; }; done
jobs:
build:
name: Build and Run Devcontainer
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: "latest"
- name: verify feature lockfile integrity
run: |
npm install -g @devcontainers/cli@latest
devcontainer build --workspace-folder . --image-name devsy-lock-verify:tmp --frozen-lockfile
- uses: devcontainers/ci@513af61f4de4f75d37e4438f184ba4358f0fc1ca # v0.3
with:
runCmd: ${{ inputs.runCmd || env.DEFAULT_RUN_CMD }}