Skip to content

Commit ed2b9fd

Browse files
committed
feat: Add build-dev-container.yaml and devcontainer.json
- Added build-dev-container.yaml file for building the development container. - Added devcontainer.json file with configuration details for the development container.
1 parent a23ef28 commit ed2b9fd

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: 'build'
2+
on: # rebuild any PRs and main branch changes
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
13+
- name: Checkout (GitHub)
14+
uses: actions/checkout@v3
15+
16+
- name: Login to GitHub Container Registry
17+
uses: docker/login-action@v2
18+
with:
19+
registry: ghcr.io
20+
username: ${{ github.repository_owner }}
21+
password: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Build and run Dev Container task
24+
uses: devcontainers/[email protected]
25+
with:
26+
subFolder: ./templates/react-native
27+
imageName: ghcr.io/pnstack/codespace
28+
runCmd: make ci-build
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
3+
{
4+
"name": "Ubuntu",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/base:focal",
7+
"runArgs": ["--device=/dev/net/tun"],
8+
"features": {
9+
"ghcr.io/devcontainers/features/java:1": {
10+
"installGradle": true,
11+
"version": "latest",
12+
"jdkDistro": "ms",
13+
"gradleVersion": "latest",
14+
"mavenVersion": "latest",
15+
"antVersion": "latest"
16+
},
17+
"ghcr.io/devcontainers/features/node:1": {
18+
"nodeGypDependencies": true,
19+
"version": "lts",
20+
"nvmVersion": "latest"
21+
},
22+
"ghcr.io/devcontainers/features/ruby:1": {
23+
"version": "latest"
24+
},
25+
"ghcr.io/devcontainers-contrib/features/fish-apt-get:1": {},
26+
"ghcr.io/tailscale/codespace/tailscale": {},
27+
"ghcr.io/pnstack/codespace/android-sdk:latest": {}
28+
},
29+
30+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
31+
// "forwardPorts": [],
32+
33+
// Use 'postCreateCommand' to run commands after the container is created.
34+
// "postCreateCommand": "uname -a",
35+
36+
// Configure tool-specific properties.
37+
// "customizations": {},
38+
39+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
40+
"remoteUser": "root"
41+
}

0 commit comments

Comments
 (0)