-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: KiBot (KiCad 8) Docker image | ||
|
||
on: | ||
push: | ||
tags: | ||
- ki8_* | ||
repository_dispatch: | ||
types: [build_k8] | ||
|
||
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 ki8 | ||
./build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: KiBot (KiCad 8 deps) Docker image | ||
|
||
on: | ||
push: | ||
tags: | ||
- ki8p_* | ||
repository_dispatch: | ||
types: [build_k8p] | ||
|
||
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 ki8_pre | ||
./build.sh | ||
- name: Trigger KiCad-Auto image build | ||
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/dispatches --data '{"event_type": "build_k8"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM ghcr.io/inti-cmnb/kicad8_auto:latest_deps | ||
MAINTAINER Salvador E. Tropea <set@ieee.org> | ||
LABEL Description="KiCad 8 w/KiBot and other automation scripts" | ||
LABEL org.opencontainers.image.description "KiCad 8 w/KiBot and other automation scripts" | ||
|
||
# Install all the tools, dependencies are already installed | ||
RUN apt-get update && \ | ||
dl_deb.py INTI-CMNB/KiBoM && \ | ||
dl_deb.py INTI-CMNB/kicad-git-filters && \ | ||
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 && \ | ||
apt-get -y autoremove && \ | ||
rm /*.deb && \ | ||
rm -rf /var/lib/apt/lists/* /var/cache/debconf/templates.dat-old /var/lib/dpkg/status-old | ||
|
||
ARG iteration | ||
ENV KIBOT_ITERATION=$iteration | ||
|
||
RUN kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n' > /etc/kiauto_tag && \ | ||
echo -n -${KIBOT_ITERATION}_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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
set -e | ||
. ../iteration.sh | ||
docker build -f Dockerfile --build-arg iteration=${IT} -t ghcr.io/inti-cmnb/kicad8_auto:latest . | ||
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad8_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/kicad8_auto:latest kicad_version.py` | ||
TG3=d_sid | ||
docker tag ghcr.io/inti-cmnb/kicad8_auto:latest ghcr.io/inti-cmnb/kicad8_auto:${TG1}-${IT}_${TG2}_${TG3} | ||
docker tag ghcr.io/inti-cmnb/kicad8_auto:latest ghcr.io/inti-cmnb/kicad8_auto:${TG1} | ||
docker tag ghcr.io/inti-cmnb/kicad8_auto:latest ghcr.io/inti-cmnb/kicad_auto:ki8 | ||
docker push ghcr.io/inti-cmnb/kicad8_auto:${TG1}-${IT}_${TG2}_${TG3} | ||
docker push ghcr.io/inti-cmnb/kicad8_auto:${TG1} | ||
docker push ghcr.io/inti-cmnb/kicad_auto:ki8 | ||
# Leave the following for the deploy: | ||
#docker tag ghcr.io/inti-cmnb/kicad8_auto:latest setsoft/kicad_auto:ki8 | ||
#docker push ghcr.io/inti-cmnb/kicad8_auto:latest | ||
#docker push setsoft/kicad_auto:ki8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
docker run --rm -it ghcr.io/inti-cmnb/kicad_auto:ki8 /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
export USER_ID=$(id -u) | ||
export GROUP_ID=$(id -g) | ||
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" \ | ||
--volume="/etc/group:/etc/group:ro" \ | ||
--volume="/home/$USER:/home/$USER:rw" \ | ||
--volume="/etc/passwd:/etc/passwd:ro" \ | ||
--volume="/etc/shadow:/etc/shadow:ro" \ | ||
--volume="/home/$USER:/home/$USER:rw" \ | ||
ghcr.io/inti-cmnb/kicad_auto:ki8 /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM ghcr.io/inti-cmnb/kicad8_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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
set -e | ||
cp ../dl_deb.py . | ||
docker build -f Dockerfile -t ghcr.io/inti-cmnb/kicad8_auto:latest_deps . | ||
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad8_auto:latest_deps kicad_version.py` | ||
TG2=d_sid | ||
docker tag ghcr.io/inti-cmnb/kicad8_auto:latest_deps ghcr.io/inti-cmnb/kicad8_auto:${TG1}_${TG2}_deps | ||
docker push ghcr.io/inti-cmnb/kicad8_auto:${TG1}_${TG2}_deps | ||
docker push ghcr.io/inti-cmnb/kicad8_auto:latest_deps | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
docker run --rm -it ghcr.io/inti-cmnb/kicad8_auto:latest_deps /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
export USER_ID=$(id -u) | ||
export GROUP_ID=$(id -g) | ||
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" \ | ||
--volume="/etc/group:/etc/group:ro" \ | ||
--volume="/home/$USER:/home/$USER:rw" \ | ||
--volume="/etc/passwd:/etc/passwd:ro" \ | ||
--volume="/etc/shadow:/etc/shadow:ro" \ | ||
--volume="/home/$USER:/home/$USER:rw" \ | ||
ghcr.io/inti-cmnb/kicad8_auto:latest_deps /bin/bash |