Skip to content

Commit c1f939b

Browse files
committed
[Added] Experimental KiCad 10 images
1 parent 9dadf74 commit c1f939b

22 files changed

Lines changed: 268 additions & 0 deletions
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: KiCad 10 Docker image
2+
3+
on:
4+
push:
5+
tags:
6+
- ki10_*
7+
repository_dispatch:
8+
types: [build_k10]
9+
10+
jobs:
11+
push_to_registry:
12+
name: Push Docker image to Docker Hub
13+
runs-on: ubuntu-latest
14+
permissions:
15+
packages: write
16+
contents: read
17+
18+
steps:
19+
- name: Check out the repo
20+
uses: actions/checkout@v4
21+
22+
- name: Log in to Docker Hub
23+
uses: docker/login-action@v3
24+
with:
25+
username: ${{ secrets.DOCKER_USERNAME }}
26+
password: ${{ secrets.DOCKER_PASSWORD }}
27+
28+
- name: Log in to the Container registry
29+
uses: docker/login-action@v3
30+
with:
31+
registry: ghcr.io
32+
username: ${{ github.actor }}
33+
password: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: Build and push Docker image
36+
run: |
37+
cd ki10
38+
./build.sh
39+
./push.sh
40+
41+
- name: Trigger KiCad-Auto image build
42+
run: |
43+
curl -X POST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/INTI-CMNB/kicad_auto/dispatches --data '{"event_type": "build_k10p"}'
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: KiCad 10 Full Docker image
2+
3+
on:
4+
push:
5+
tags:
6+
- ki10f_*
7+
repository_dispatch:
8+
types: [build_k10f]
9+
10+
jobs:
11+
push_to_registry:
12+
name: Push Docker image to Docker Hub
13+
runs-on: ubuntu-latest
14+
permissions:
15+
packages: write
16+
contents: read
17+
18+
steps:
19+
- name: Check out the repo
20+
uses: actions/checkout@v4
21+
22+
- name: Log in to Docker Hub
23+
uses: docker/login-action@v3
24+
with:
25+
username: ${{ secrets.DOCKER_USERNAME }}
26+
password: ${{ secrets.DOCKER_PASSWORD }}
27+
28+
- name: Log in to the Container registry
29+
uses: docker/login-action@v3
30+
with:
31+
registry: ghcr.io
32+
username: ${{ github.actor }}
33+
password: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: Build and push Docker image
36+
run: |
37+
cd ki10_full
38+
./build.sh
39+
./push.sh
40+
41+
- name: Trigger KiCad-Auto image build
42+
run: |
43+
curl -X POST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/INTI-CMNB/kicad_auto_test/dispatches --data '{"event_type": "build_k10p"}'

ki10/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM ghcr.io/inti-cmnb/base_os:latest
2+
LABEL MAINTAINER="Salvador E. Tropea <stropea@inti.gob.ar>"
3+
LABEL Description="KiCad 10 on Debian + base tools"
4+
LABEL org.opencontainers.image.description="KiCad 10 on Debian + base tools"
5+
6+
ARG DEBIAN_FRONTEND=noninteractive
7+
ENV TZ=Etc/UTC
8+
COPY kicad_version.py /usr/bin/
9+
COPY kicad-10.0-releases.sources /etc/apt/sources.list.d/
10+
# Used to get WIP versions
11+
COPY kicad-10.0-nightly.sources /etc/apt/sources.list.d/
12+
COPY kicad_3d_install.sh kicad_version.py /usr/bin/
13+
RUN apt-get -y update && \
14+
apt-get -y install --no-install-recommends kicad kicad-libraries kicad-footprints kicad-symbols kicad-templates && \
15+
apt-get -y autoremove && \
16+
rm -rf /var/lib/apt/lists/* /var/cache/debconf/templates.dat-old /var/lib/dpkg/status-old && \
17+
rm -rf /usr/share/icons/Adwaita/ /*.deb

ki10/build.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
set -e
3+
cp ../kicad_version.py .
4+
docker build -f Dockerfile -t ghcr.io/inti-cmnb/kicad10_debian:latest .
5+
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad10_debian:latest kicad_version.py`
6+
TG2=d`docker run --rm ghcr.io/inti-cmnb/kicad10_debian:latest cat /etc/debian_version | tr -d '\n'`
7+
docker tag ghcr.io/inti-cmnb/kicad10_debian:latest ghcr.io/inti-cmnb/kicad_debian:ki${TG1}_Debian
8+
docker tag ghcr.io/inti-cmnb/kicad10_debian:latest ghcr.io/inti-cmnb/kicad_debian:ki9
9+
docker tag ghcr.io/inti-cmnb/kicad10_debian:latest setsoft/kicad_debian:ki${TG1}_Debian
10+
docker tag ghcr.io/inti-cmnb/kicad10_debian:latest setsoft/kicad_debian:ki9
11+
docker tag ghcr.io/inti-cmnb/kicad10_debian:latest ghcr.io/inti-cmnb/kicad10_debian:${TG1}
12+
docker tag ghcr.io/inti-cmnb/kicad10_debian:latest ghcr.io/inti-cmnb/kicad10_debian:${TG1}_${TG2}

ki10/kicad-10.0-nightly.sources

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Types: deb
2+
URIs: https://ppa.launchpadcontent.net/kicad/kicad-10.0-nightly/ubuntu
3+
Suites: questing
4+
Components: main
5+
Trusted: yes

ki10/kicad-10.0-releases.sources

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Types: deb
2+
URIs: https://ppa.launchpadcontent.net/kicad/kicad-10.0-releases/ubuntu
3+
Suites: questing
4+
Components: main
5+
Trusted: yes

ki10/kicad_3d_install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
apt-get -y update
3+
apt-get -y install --no-install-recommends kicad-packages3d
4+
rm -rf /var/lib/apt/lists/*

ki10/kicad_version.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/python3
2+
import pcbnew
3+
import re
4+
5+
kicad_version = pcbnew.GetBuildVersion()
6+
m = re.search(r'(\d+)\.(\d+)\.(\d+)(?:\.(\d+))?', kicad_version)
7+
g = m.groups()
8+
if g[3] is None:
9+
g = g[:3]
10+
print('.'.join(g), end='')
11+

ki10/push.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
set -e
3+
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad10_debian:latest kicad_version.py`
4+
TG2=d`docker run --rm ghcr.io/inti-cmnb/kicad10_debian:latest cat /etc/debian_version | tr -d '\n'`
5+
docker push ghcr.io/inti-cmnb/kicad_debian:ki${TG1}_Debian
6+
docker push ghcr.io/inti-cmnb/kicad_debian:ki10
7+
docker push setsoft/kicad_debian:ki${TG1}_Debian
8+
docker push setsoft/kicad_debian:ki10
9+
docker push ghcr.io/inti-cmnb/kicad10_debian:${TG1}
10+
docker push ghcr.io/inti-cmnb/kicad10_debian:${TG1}_${TG2}
11+
docker push ghcr.io/inti-cmnb/kicad10_debian:latest
12+

ki10/run_kicad_same_user.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
export USER_ID=$(id -u)
3+
export GROUP_ID=$(id -g)
4+
docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
5+
--user $USER_ID:$GROUP_ID \
6+
--env NO_AT_BRIDGE=1 \
7+
--workdir="/home/$USER" \
8+
--volume="/etc/group:/etc/group:ro" \
9+
--volume="/home/$USER:/home/$USER:rw" \
10+
--volume="/etc/passwd:/etc/passwd:ro" \
11+
--volume="/etc/shadow:/etc/shadow:ro" \
12+
--volume="/home/$USER:/home/$USER:rw" \
13+
ghcr.io/inti-cmnb/kicad10_debian:latest kicad

0 commit comments

Comments
 (0)