Skip to content

Commit b15ac31

Browse files
committed
Fix formatting in devcontainer workflow file
1 parent b00434c commit b15ac31

File tree

4 files changed

+91
-50
lines changed

4 files changed

+91
-50
lines changed

.devcontainer/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ RUN apt-get update && \
2121
pkg-config \
2222
clang-format \
2323
python3 \
24-
python3-tk
24+
python3-tk \
25+
erlang \
26+
rebar3
2527

2628
WORKDIR /apps
2729

@@ -45,6 +47,9 @@ RUN cd /apps && git clone https://github.com/raspberrypi/picotool.git --depth=1
4547
cd picotool && mkdir build && cd build && cmake ../ && make -j 8 && cp picotool /usr/local/bin
4648
RUN cd /apps && git clone https://github.com/wtarreau/bootterm.git --depth=1 && \
4749
cd bootterm && make -j 8 install
50+
RUN git clone https://github.com/pguyot/uf2tool.git --depth=1 && \
51+
cd uf2tool && rebar3 escriptize && \
52+
cp _build/default/bin/uf2tool /usr/local/bin
4853

4954
RUN cd /usr/bin && ln -s /usr/bin/objdump objdump-multiarch && ln -s /usr/bin/nm nm-multiarch
5055

.devcontainer/devcontainer.json

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,4 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2-
// https://github.com/mwinters-stuff/vscode-devcontainer-raspberrypi-pico
31
{
4-
"name": "C++ Raspberry Pi Pico",
5-
"build": {
6-
"dockerfile": "Dockerfile"
7-
},
8-
"runArgs": [
9-
"--cap-add=SYS_PTRACE",
10-
"--security-opt",
11-
"seccomp=unconfined",
12-
"--privileged",
13-
"-v", "/dev/bus/usb:/dev/bus/usb",
14-
"--device=/dev/bus/usb",
15-
"--device=/dev/ttyACM0"
16-
],
17-
18-
// Set *default* container specific settings.json values on container create.
19-
"customizations": {
20-
"vscode": {
21-
"settings": {
22-
"terminal.integrated.profiles.linux": {
23-
"bash": {
24-
"path": "/usr/bin/bash"
25-
}
26-
}
27-
},
28-
29-
// Add the IDs of extensions you want installed when the container is created.
30-
"extensions": [
31-
"ms-vscode.cpptools",
32-
"marus25.cortex-debug",
33-
"ms-vscode.cmake-tools",
34-
"twxs.cmake",
35-
"eamodio.gitlens",
36-
"xaver.clang-format",
37-
"chris-hock.pioasm",
38-
"ms-vscode.cpptools-extension-pack"
39-
]
40-
}
41-
},
42-
43-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
44-
// "forwardPorts": [],
45-
46-
// Use 'postCreateCommand' to run commands after the container is created.
47-
// "postCreateCommand": "gcc -v",
48-
49-
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
50-
"remoteUser": "vscode"
2+
"name": "PicoBoot build environment",
3+
"image": "ghcr.io/webhdx/PicoBoot:latest"
514
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/mwinters-stuff/vscode-devcontainer-raspberrypi-pico
3+
{
4+
"name": "C++ Raspberry Pi Pico",
5+
"build": {
6+
"dockerfile": "Dockerfile"
7+
},
8+
"runArgs": [
9+
"--cap-add=SYS_PTRACE",
10+
"--security-opt",
11+
"seccomp=unconfined",
12+
"--privileged",
13+
"-v", "/dev/bus/usb:/dev/bus/usb",
14+
"--device=/dev/bus/usb",
15+
"--device=/dev/ttyACM0"
16+
],
17+
18+
// Set *default* container specific settings.json values on container create.
19+
"customizations": {
20+
"vscode": {
21+
"settings": {
22+
"terminal.integrated.profiles.linux": {
23+
"bash": {
24+
"path": "/usr/bin/bash"
25+
}
26+
}
27+
},
28+
29+
// Add the IDs of extensions you want installed when the container is created.
30+
"extensions": [
31+
"ms-vscode.cpptools",
32+
"marus25.cortex-debug",
33+
"ms-vscode.cmake-tools",
34+
"twxs.cmake",
35+
"eamodio.gitlens",
36+
"xaver.clang-format",
37+
"chris-hock.pioasm",
38+
"ms-vscode.cpptools-extension-pack"
39+
]
40+
}
41+
},
42+
43+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
44+
// "forwardPorts": [],
45+
46+
// Use 'postCreateCommand' to run commands after the container is created.
47+
// "postCreateCommand": "gcc -v",
48+
49+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
50+
"remoteUser": "vscode"
51+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Dev Container Build and Push Image
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- "main"
8+
pull_requests:
9+
branches:
10+
- "main"
11+
12+
jobs:
13+
build-and-push:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Login to GitHub Container Registry
20+
uses: docker/login-action@v3
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.repository_owner }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Pre-build dev container image
27+
uses: devcontainers/ci@v0.3
28+
with:
29+
subFolder: .github
30+
imageName: ghcr.io/${{ github.repository }}
31+
cacheFrom: ghcr.io/${{ github.repository }}
32+
push: always

0 commit comments

Comments
 (0)