diff --git a/.github/workflows/dev_images.yml b/.github/workflows/dev_images.yml index 6c6c70a9..9b7a4876 100644 --- a/.github/workflows/dev_images.yml +++ b/.github/workflows/dev_images.yml @@ -9,7 +9,7 @@ jobs: push_to_registry: strategy: matrix: - ki_release: [dev_image_k5, dev_image_k6, dev_image_k7, dev_image_k5f, dev_image_k6f, dev_image_k7f] + ki_release: [dev_image_k5, dev_image_k6, dev_image_k7, dev_image_k8, dev_image_k5f, dev_image_k6f, dev_image_k7f, dev_image_k8f] name: Docker ${{ matrix.ki_release }} runs-on: ubuntu-latest @@ -21,16 +21,16 @@ jobs: steps: - name: Check out the repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Log in to the Container registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/tools/dev_image_k8/Dockerfile b/tools/dev_image_k8/Dockerfile new file mode 100644 index 00000000..1787851c --- /dev/null +++ b/tools/dev_image_k8/Dockerfile @@ -0,0 +1,33 @@ +FROM ghcr.io/inti-cmnb/kicad_auto:ki8 +MAINTAINER Salvador E. Tropea +LABEL Description="KiCad 7 with KiBot and other automation scripts" + +RUN dpkg --remove kicost kibot && \ + apt-get update && \ + apt-get -y install --no-install-recommends curl unzip python3-pip && \ + curl https://codeload.github.com/INTI-CMNB/KiBot/zip/refs/heads/dev --output pp.zip && \ + unzip pp.zip && \ + pip3 install --break-system-packages --no-compile KiBot-dev/ && \ + rm -rf KiBot-dev pp.zip && \ + curl https://codeload.github.com/hildogjr/KiCost/zip/refs/heads/master --output pp.zip && \ + unzip pp.zip && \ + pip3 install --break-system-packages KiCost-master/ && \ + apt-get -y remove curl unzip python3-pip && \ + rm -rf KiCost-master pp.zip && \ + rm -rf /var/lib/apt/lists/* + +# kidiff depends on KiAuto +# dpkg --remove kiauto && \ +# curl https://codeload.github.com/INTI-CMNB/KiAuto/zip/refs/heads/master --output pp.zip && \ +# unzip pp.zip && \ +# pip3 install --break-system-packages KiAuto-master/ && \ +# rm -rf KiAuto-master/ pp.zip && \ + +ARG repo_hash +ENV KIBOT_REPO_HASH=$repo_hash + +RUN kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n' > /etc/kiauto_tag && \ + echo -n -${KIBOT_REPO_HASH}_k >> /etc/kiauto_tag && \ + kicad_version.py >> /etc/kiauto_tag && \ + echo -n _d >> /etc/kiauto_tag && \ + cat /etc/debian_version | tr -d '\n' >> /etc/kiauto_tag diff --git a/tools/dev_image_k8/build.sh b/tools/dev_image_k8/build.sh new file mode 100755 index 00000000..6f2dc9bb --- /dev/null +++ b/tools/dev_image_k8/build.sh @@ -0,0 +1,14 @@ +#!/bin/sh +set -e +HASH=`git log --pretty=format:%h -1 | tr -d '\n'` +docker build -f Dockerfile --build-arg repo_hash=${HASH} -t ghcr.io/inti-cmnb/kicad8_auto:dev . +TG1=`docker run --rm ghcr.io/inti-cmnb/kicad8_auto:dev kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n'` +TG2=k`docker run --rm ghcr.io/inti-cmnb/kicad8_auto:dev kicad_version.py` +TG3=d_sid +docker tag ghcr.io/inti-cmnb/kicad8_auto:dev ghcr.io/inti-cmnb/kicad8_auto:dev_${TG1}-${HASH}_${TG2}_${TG3} +docker tag ghcr.io/inti-cmnb/kicad8_auto:dev ghcr.io/inti-cmnb/kicad_auto:dev_k8_${TG1}-${HASH}_${TG2}_${TG3} +docker tag ghcr.io/inti-cmnb/kicad8_auto:dev ghcr.io/inti-cmnb/kicad_auto:dev_k8 +docker push ghcr.io/inti-cmnb/kicad8_auto:dev_${TG1}-${HASH}_${TG2}_${TG3} +docker push ghcr.io/inti-cmnb/kicad_auto:dev_k8_${TG1}-${HASH}_${TG2}_${TG3} +docker push ghcr.io/inti-cmnb/kicad_auto:dev_k8 +docker push ghcr.io/inti-cmnb/kicad8_auto:dev diff --git a/tools/dev_image_k8f/Dockerfile b/tools/dev_image_k8f/Dockerfile new file mode 100644 index 00000000..dcc97b39 --- /dev/null +++ b/tools/dev_image_k8f/Dockerfile @@ -0,0 +1,34 @@ +FROM ghcr.io/inti-cmnb/kicad_auto_test:ki8 +MAINTAINER Salvador E. Tropea +LABEL Description="KiCad 8 with KiBot and other automation scripts" + +RUN dpkg --remove kicost kibot && \ + apt-get update && \ + curl https://codeload.github.com/INTI-CMNB/KiBot/zip/refs/heads/dev --output pp.zip && \ + unzip pp.zip && \ + pip3 install --break-system-packages --no-compile KiBot-dev/ && \ + rm -rf KiBot-dev pp.zip && \ + curl https://codeload.github.com/hildogjr/KiCost/zip/refs/heads/master --output pp.zip && \ + unzip pp.zip && \ + pip3 install --break-system-packages KiCost-master/ && \ + rm -rf KiCost-master pp.zip && \ + rm -rf /var/lib/apt/lists/* + +# kidiff depends on KiAuto +# dpkg --remove kiauto && \ +# curl https://codeload.github.com/INTI-CMNB/KiAuto/zip/refs/heads/master --output pp.zip && \ +# unzip pp.zip && \ +# pip3 install --break-system-packages KiAuto-master/ && \ +# rm -rf KiAuto-master/ pp.zip && \ + +ARG repo_hash +ENV KIBOT_REPO_HASH=$repo_hash +ENV KICAD_AUTO_FULL=1 + +RUN kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n' > /etc/kiauto_tag && \ + echo -n -${KIBOT_REPO_HASH}_k >> /etc/kiauto_tag && \ + kicad_version.py >> /etc/kiauto_tag && \ + echo -n _d >> /etc/kiauto_tag && \ + cat /etc/debian_version | tr -d '\n' >> /etc/kiauto_tag && \ + echo -n _b >> /etc/kiauto_tag && \ + blender --version | head -n 1 | tr -d 'Blender ' >> /etc/kiauto_tag diff --git a/tools/dev_image_k8f/build.sh b/tools/dev_image_k8f/build.sh new file mode 100755 index 00000000..eb65d86c --- /dev/null +++ b/tools/dev_image_k8f/build.sh @@ -0,0 +1,15 @@ +#!/bin/sh +set -e +export HASH=`git log --pretty=format:%h -1 | tr -d '\n'` +docker build -f Dockerfile --build-arg repo_hash=${HASH} -t ghcr.io/inti-cmnb/kicad8_auto_full:dev . +TG1=`docker run --rm ghcr.io/inti-cmnb/kicad8_auto_full:dev kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n'` +TG2=k`docker run --rm ghcr.io/inti-cmnb/kicad8_auto_full:dev kicad_version.py` +TG3=d_sid +TG4=b`docker run --rm ghcr.io/inti-cmnb/kicad8_auto_full:dev /bin/bash -c "blender --version | head -n 1 | tr -d 'Blender '"` +docker tag ghcr.io/inti-cmnb/kicad8_auto_full:dev ghcr.io/inti-cmnb/kicad8_auto_full:dev_${TG1}-${HASH}_${TG2}_${TG3}_${TG4} +docker tag ghcr.io/inti-cmnb/kicad8_auto_full:dev ghcr.io/inti-cmnb/kicad_auto_full:dev_k8_${TG1}-${HASH}_${TG2}_${TG3}_${TG4} +docker tag ghcr.io/inti-cmnb/kicad8_auto_full:dev ghcr.io/inti-cmnb/kicad_auto_full:dev_k8 +docker push ghcr.io/inti-cmnb/kicad8_auto_full:dev_${TG1}-${HASH}_${TG2}_${TG3}_${TG4} +docker push ghcr.io/inti-cmnb/kicad_auto_full:dev_k8_${TG1}-${HASH}_${TG2}_${TG3}_${TG4} +docker push ghcr.io/inti-cmnb/kicad_auto_full:dev_k8 +docker push ghcr.io/inti-cmnb/kicad8_auto_full:dev