Adapted KiCad 6 images to the new layers
This commit is contained in:
parent
e555fd4c2e
commit
f578739521
|
|
@ -1,4 +1,4 @@
|
|||
name: Docker Hub upload (KiCad 6)
|
||||
name: KiBot (KiCad 6) Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -9,7 +9,7 @@ on:
|
|||
|
||||
jobs:
|
||||
push_to_registry:
|
||||
name: Push Docker image to Docker Hub and GitHub Packages
|
||||
name: Push Docker image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
|
|
@ -32,28 +32,7 @@ jobs:
|
|||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
setsoft/kicad_auto
|
||||
ghcr.io/${{ github.repository }}
|
||||
ghcr.io/inti-cmnb/kicad6_auto
|
||||
tags: |
|
||||
type=raw,ki6
|
||||
|
||||
- name: Build and push Docker images
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: ki6
|
||||
push: true
|
||||
tags: |
|
||||
setsoft/kicad_auto:ki6
|
||||
ghcr.io/inti-cmnb/kicad_auto:ki6
|
||||
ghcr.io/inti-cmnb/kicad6_auto:latest
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
- name: Trigger KiCad-Auto-Test image build
|
||||
- name: Build and push Docker image
|
||||
run: |
|
||||
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_k6"}'
|
||||
cd ki6
|
||||
./build.sh
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
name: KiBot (KiCad 6 Full) Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- ki6f_*
|
||||
repository_dispatch:
|
||||
types: [build_k6f]
|
||||
|
||||
jobs:
|
||||
push_to_registry:
|
||||
name: Push Docker image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
run: |
|
||||
cd ki6_full
|
||||
./build.sh
|
||||
|
|
@ -1,33 +1,21 @@
|
|||
FROM ghcr.io/inti-cmnb/kicad6_debian:latest
|
||||
FROM ghcr.io/inti-cmnb/kicad6_auto:latest_deps
|
||||
MAINTAINER Salvador E. Tropea <set@ieee.org>
|
||||
LABEL Description="KiCad with KiBot and other automation scripts"
|
||||
LABEL Description="KiCad 6 w/KiBot and other automation scripts"
|
||||
LABEL org.opencontainers.image.description "KiCad 6 w/KiBot and other automation scripts"
|
||||
|
||||
RUN sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list && \
|
||||
apt-get update && \
|
||||
apt-get -y install -t bullseye-backports curl && \
|
||||
apt-get -y install --no-install-recommends -t bullseye-backports git && \
|
||||
apt-get -y install make wget curl rar bzip2 librsvg2-bin ghostscript && \
|
||||
apt-get -y install --no-install-recommends imagemagick python3-qrcodegen poppler-utils && \
|
||||
dl_deb.py INTI-CMNB/KiAuto && \
|
||||
# Install all the tools, dependencies are already installed
|
||||
RUN apt-get update && \
|
||||
dl_deb.py INTI-CMNB/KiBoM && \
|
||||
dl_deb.py INTI-CMNB/InteractiveHtmlBom && \
|
||||
dl_deb.py INTI-CMNB/PcbDraw && \
|
||||
dl_deb.py hildogjr/KiCost && \
|
||||
dl_deb.py INTI-CMNB/KiBot && \
|
||||
dl_deb.py set-soft/kicost-digikey-api-v3 && \
|
||||
dl_deb.py INTI-CMNB/kicad-git-filters && \
|
||||
dl_deb.py INTI-CMNB/kidiff && \
|
||||
dl_deb.py set-soft/kicost-digikey-api-v3 && \
|
||||
dl_deb.py hildogjr/KiCost && \
|
||||
dl_deb.py INTI-CMNB/InteractiveHtmlBom && \
|
||||
dl_deb.py set-soft/pcbnewTransition && \
|
||||
dl_deb.py INTI-CMNB/KiKit --skip kikit-doc && \
|
||||
dl_deb.py INTI-CMNB/KiAuto && \
|
||||
dl_deb.py INTI-CMNB/kidiff && \
|
||||
dl_deb.py INTI-CMNB/KiBot && \
|
||||
apt -y install --no-install-recommends ./*.deb && \
|
||||
sed -i 's/<policy domain="coder" rights="none" pattern="PDF" \/>/<!-- <policy domain="coder" rights="none" pattern="PDF" \/> -->/g' /etc/ImageMagick-6/policy.xml && \
|
||||
sed -i 's/<policy domain="coder" rights="none" pattern="PS" \/>/<!-- <policy domain="coder" rights="none" pattern="PS" \/> -->/g' /etc/ImageMagick-6/policy.xml && \
|
||||
apt-get -y remove curl wget && \
|
||||
apt-get -y autoremove && \
|
||||
rm /*.deb && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
# Needed for GitHub seen on git 2.39.1
|
||||
RUN echo "[safe]" >> /etc/gitconfig && \
|
||||
echo " directory = *" >> /etc/gitconfig && \
|
||||
echo '[protocol "file"]' >> /etc/gitconfig && \
|
||||
echo ' allow = always' >> /etc/gitconfig
|
||||
rm -rf /var/lib/apt/lists/* /var/cache/debconf/templates.dat-old /var/lib/dpkg/status-old
|
||||
|
|
|
|||
16
ki6/build.sh
16
ki6/build.sh
|
|
@ -1,2 +1,16 @@
|
|||
#!/bin/sh
|
||||
docker build -f Dockerfile -t setsoft/kicad_auto:ki6 .
|
||||
docker build -f Dockerfile -t ghcr.io/inti-cmnb/kicad6_auto:latest .
|
||||
IT=2
|
||||
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad6_auto:latest kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n'`
|
||||
TG2=k`docker run --rm ghcr.io/inti-cmnb/kicad6_auto:latest kicad_version.py`
|
||||
TG3=d`docker run --rm ghcr.io/inti-cmnb/kicad6_auto:latest cat /etc/debian_version | tr -d '\n'`
|
||||
docker tag ghcr.io/inti-cmnb/kicad6_auto:latest ghcr.io/inti-cmnb/kicad6_auto:${TG1}-${IT}_${TG2}_${TG3}
|
||||
docker tag ghcr.io/inti-cmnb/kicad6_auto:latest ghcr.io/inti-cmnb/kicad6_auto:${TG1}
|
||||
docker tag ghcr.io/inti-cmnb/kicad6_auto:latest ghcr.io/inti-cmnb/kicad_auto:ki6
|
||||
docker tag ghcr.io/inti-cmnb/kicad6_auto:latest setsoft/kicad_auto:ki6
|
||||
#docker push ghcr.io/inti-cmnb/kicad6_auto:${TG1}-${IT}_${TG2}_${TG3}
|
||||
#docker push ghcr.io/inti-cmnb/kicad6_auto:${TG1}
|
||||
#docker push ghcr.io/inti-cmnb/kicad6_auto:latest
|
||||
#docker push ghcr.io/inti-cmnb/kicad_auto_test:ki6
|
||||
#docker push setsoft/kicad_auto_test:ki6
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/sh
|
||||
docker run --rm -it setsoft/kicad_auto:ki6 /bin/bash
|
||||
docker run --rm -it ghcr.io/inti-cmnb/kicad6_auto:latest /bin/bash
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
|
|||
--volume="/etc/passwd:/etc/passwd:ro" \
|
||||
--volume="/etc/shadow:/etc/shadow:ro" \
|
||||
--volume="/home/$USER:/home/$USER:rw" \
|
||||
setsoft/kicad_auto:ki6 /bin/bash
|
||||
ghcr.io/inti-cmnb/kicad6_auto:latest /bin/bash
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
FROM ghcr.io/inti-cmnb/kicad6_debian:latest
|
||||
MAINTAINER Salvador E. Tropea <set@ieee.org>
|
||||
LABEL Description="Layer used for new dependencies"
|
||||
LABEL org.opencontainers.image.description "Layer used for new dependencies"
|
||||
|
||||
RUN apt-get update && \
|
||||
echo "Use wget to download some stuff" && \
|
||||
apt -y install --no-install-recommends wget && \
|
||||
echo "XLSX Writer 3 fixes some important limitations in URLs (used by KiBoM, KiCost, KiBot, etc.)" && \
|
||||
wget http://http.us.debian.org/debian/pool/main/x/xlsxwriter/python3-xlsxwriter_3.0.2-2_all.deb && \
|
||||
apt -y install --no-install-recommends ./*.deb && \
|
||||
apt-get -y remove wget && \
|
||||
apt-get -y autoremove && \
|
||||
rm /*.deb && \
|
||||
rm -rf /var/lib/apt/lists/* /var/cache/debconf/templates.dat-old /var/lib/dpkg/status-old
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
docker build -f Dockerfile -t ghcr.io/inti-cmnb/kicad6_auto:latest_deps .
|
||||
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad6_auto:latest_deps kicad_version.py`
|
||||
TG2=d`docker run --rm ghcr.io/inti-cmnb/kicad6_auto:latest_deps cat /etc/debian_version | tr -d '\n'`
|
||||
docker tag ghcr.io/inti-cmnb/kicad6_auto:latest_deps ghcr.io/inti-cmnb/kicad6_auto:${TG1}_${TG2}_deps
|
||||
docker push ghcr.io/inti-cmnb/kicad6_auto:${TG1}_${TG2}_deps
|
||||
docker push ghcr.io/inti-cmnb/kicad6_auto:latest_deps
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
docker run --rm -it ghcr.io/inti-cmnb/kicad6_auto:latest_deps /bin/bash
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
export USER_ID=$(id -u)
|
||||
export GROUP_ID=$(id -g)
|
||||
docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
|
||||
docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
|
||||
--user $USER_ID:$GROUP_ID \
|
||||
--env NO_AT_BRIDGE=1 \
|
||||
--workdir="/home/$USER" \
|
||||
|
|
@ -10,4 +10,4 @@ docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
|
|||
--volume="/etc/passwd:/etc/passwd:ro" \
|
||||
--volume="/etc/shadow:/etc/shadow:ro" \
|
||||
--volume="/home/$USER:/home/$USER:rw" \
|
||||
setsoft/kicad_auto:ki6 kicad
|
||||
ghcr.io/inti-cmnb/kicad6_auto:latest_deps /bin/bash
|
||||
Loading…
Reference in New Issue