-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (52 loc) · 1.57 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
services:
doc:
image: markdown-to-html
build:
context: ./doc/
dockerfile_inline: |
FROM node:22-alpine3.19
RUN npm install -g markdown-folder-to-html
working_dir: /data
volumes:
- ./:/data/
command: markdown-folder-to-html /data/doc
kibot:
image: ghcr.io/inti-cmnb/kicad8_auto:latest # All versions: https://kibot.readthedocs.io/en/master/usage_with_ci_cd.html
working_dir: /data
volumes:
- ./:/data/
environment:
# NO_AT_BRIDGE: 1 # Think is not needed
KICAD_3RD_PARTY: /data/3rdparty/
command: |
bash -c "
CLICOLOR_FORCE=1 kibot 2>&1 | sed 's/WARNING/::warning :/g' | sed 's/ERROR/::error :/g'
"
version:
image: git-and-bash
build:
dockerfile_inline: |
FROM cicirello/alpine-plus-plus:latest
RUN git config --global --add safe.directory /data
working_dir: /data
volumes:
- ./:/data/
command: |
bash -c '
set -e -o pipefail
VERSIONED_FILES="BatterySwitcher.kicad_pcb BatterySwitcher.kicad_sch"
if [ -z "$$GIT_VERSION_STRING" ]; then
echo GIT_VERSION_STRING env variable has not been setted
exit 1
fi
echo Applying version "$$GIT_VERSION_STRING"
if ! grep "vXX.XX.XXX" $$VERSIONED_FILES > /dev/null; then
echo "No version string found!"
exit 1
fi
for file in $$VERSIONED_FILES; do
sed -i "s/vXX.XX.XXX/$$GIT_VERSION_STRING/g" $$file
done
'
environment:
GIT_VERSION_STRING: ${GIT_VERSION_STRING:-}