Skip to content

Commit eab3cba

Browse files
authored
Merge pull request #113 from devcontainers-extra/chore/prebuilt-devcontainer-image
chore: add prebuilt devcontainer image
2 parents 1810305 + 00e09ed commit eab3cba

File tree

3 files changed

+59
-25
lines changed

3 files changed

+59
-25
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,4 @@
11
{
2-
"image": "mcr.microsoft.com/devcontainers/python:3.11",
3-
"customizations": {
4-
"vscode": {
5-
"extensions": [
6-
"mads-hartmann.bash-ide-vscode",
7-
"ms-python.python",
8-
"ms-python.vscode-pylance",
9-
"DavidAnson.vscode-markdownlint",
10-
"nefrob.vscode-just-syntax",
11-
"timonwong.shellcheck",
12-
"ms-vscode-remote.remote-containers",
13-
"github.vscode-github-actions"
14-
]
15-
}
16-
},
17-
"features": {
18-
"ghcr.io/devcontainers/features/node:1.6.1": {},
19-
"ghcr.io/devcontainers/features/github-cli:1.0.13": {},
20-
"ghcr.io/devcontainers/features/docker-in-docker:2.12.0": {},
21-
"ghcr.io/lukewiwa/features/shellcheck:0.2.3": {},
22-
"ghcr.io/guiyomh/features/just:0": {},
23-
"ghcr.io/devcontainers-extra/features/pre-commit:2": {},
24-
"ghcr.io/devcontainers-extra/features/tmux-homebrew:1": {},
25-
"ghcr.io/devcontainers-extra/features/act:1": {}
26-
},
2+
"image": "ghcr.io/devcontainers-extra/features/prebuilt-devcontainer:latest",
273
"postCreateCommand": "/bin/bash -ex ./.devcontainer/setup.sh > postCreateCommand.log"
284
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"image": "mcr.microsoft.com/devcontainers/python:3.11",
3+
"customizations": {
4+
"vscode": {
5+
"extensions": [
6+
"mads-hartmann.bash-ide-vscode",
7+
"ms-python.python",
8+
"ms-python.vscode-pylance",
9+
"DavidAnson.vscode-markdownlint",
10+
"nefrob.vscode-just-syntax",
11+
"timonwong.shellcheck",
12+
"ms-vscode-remote.remote-containers",
13+
"github.vscode-github-actions"
14+
]
15+
}
16+
},
17+
"features": {
18+
"ghcr.io/devcontainers/features/node:1.6.1": {},
19+
"ghcr.io/devcontainers/features/github-cli:1.0.13": {},
20+
"ghcr.io/devcontainers/features/docker-in-docker:2.12.0": {},
21+
"ghcr.io/lukewiwa/features/shellcheck:0.2.3": {},
22+
"ghcr.io/guiyomh/features/just:0": {},
23+
"ghcr.io/devcontainers-extra/features/pre-commit:2": {},
24+
"ghcr.io/devcontainers-extra/features/tmux-homebrew:1": {},
25+
"ghcr.io/devcontainers-extra/features/act:1": {}
26+
}
27+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build and Push Prebuilt Devcontainer
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '.github/.devcontainer/**'
9+
workflow_dispatch: {}
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Login to GitHub Container Registry
19+
uses: docker/login-action@v3
20+
with:
21+
registry: ghcr.io
22+
username: ${{ github.repository_owner }}
23+
password: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Prebuild dev container image
26+
uses: devcontainers/[email protected]
27+
with:
28+
subFolder: .github/.devcontainer
29+
imageName: ghcr.io/${{ github.repository }}/prebuilt-devcontainer
30+
cacheFrom: ghcr.io/${{ github.repository }}/prebuilt-devcontainer
31+
push: always

0 commit comments

Comments
 (0)