Skip to content

Commit

Permalink
devcontainer for dev environment setup
Browse files Browse the repository at this point in the history
  • Loading branch information
lmilbaum committed Mar 16, 2024
1 parent 742292d commit e5be82f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "Tekton pipeline",
"image": "mcr.microsoft.com/vscode/devcontainers/go:1.22",
"features": {
"ghcr.io/devcontainers-contrib/features/pre-commit:2.0.17": {
"version": "3.6.2"
}
}
}
20 changes: 20 additions & 0 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: 'devcontainer'

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Checkout (GitHub)
uses: actions/[email protected]

- name: Build and run dev container task
uses: devcontainers/[email protected]
with:
runCmd: pre-commit run --all-files
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ repos:
language: system
types: [go]
pass_filenames: false
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.0
hooks:
- id: check-github-actions
4 changes: 4 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,10 @@ optional: As a convenience, the [Tekton plumbing project](https://github.com/tek
--user=$(gcloud config get-value core/account)
```

#### Using [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers)

- Follow the instruction for [getting up and running](https://code.visualstudio.com/docs/devcontainers/tutorial)

---

## Developing and testing
Expand Down

0 comments on commit e5be82f

Please sign in to comment.