1
- name : kicad nightly base
1
+ name : build kicad-render nightly image
2
2
on :
3
+ schedule :
4
+ - cron : 12 12 1 * *
3
5
workflow_dispatch :
4
6
push :
5
7
paths :
@@ -14,26 +16,87 @@ jobs:
14
16
packages : write
15
17
contents : read
16
18
steps :
17
- - name : Check out the repo
18
- uses : actions/checkout@v4
19
-
20
- - name : Login to GitHub Container Registry
21
- uses : docker/login-action@v3
22
- with :
23
- registry : ghcr.io
24
- username : ${{ github.actor }}
25
- password : ${{ secrets.GITHUB_TOKEN }}
26
-
27
- - name : Get current date
28
- id : date
29
- run : echo "date=$(date +'%Y-%m-%d-%H-%M')" >> $GITHUB_OUTPUT
30
-
31
- - name : Build and push Docker image dev
32
- uses : docker/build-push-action@v5
33
- with :
34
- context : .
35
- file : ./Dockerfile.kicad-nightly
36
- push : true
37
- build-args : |
38
- "VERSION=${{ github.sha }}-dev"
39
- tags : " ghcr.io/linalinn/kicad:nightly,ghcr.io/linalinn/kicad:nightly-${{ steps.date.outputs.date }}"
19
+ - name : Check out the repo
20
+ uses : actions/checkout@v4
21
+
22
+ - name : Login to GitHub Container Registry
23
+ uses : docker/login-action@v3
24
+ with :
25
+ registry : ghcr.io
26
+ username : ${{ github.actor }}
27
+ password : ${{ secrets.GITHUB_TOKEN }}
28
+
29
+ - name : Set up Docker Buildx
30
+ uses : docker/setup-buildx-action@v3
31
+
32
+ - name : Get current date
33
+ id : date
34
+ run : echo "date=$(date +'%Y-%m-%d-%H-%M')" >> $GITHUB_OUTPUT
35
+
36
+ - name : Build and push Docker image dev
37
+ if : github.ref_name != github.event.repository.default_branch
38
+ uses : docker/build-push-action@v5
39
+ with :
40
+ context : .
41
+ file : ./Dockerfile
42
+ build-args : |
43
+ "KICAD_PPA=kicad-dev-nightly"
44
+ "KICAD_PACKAGE=kicad-nightly"
45
+ "VERSION=${{ github.sha }}"
46
+ cache-to : " type=registry,ref=ghcr.io/linalinn/kicad-render:cache-${{ github.ref_name }}"
47
+ cache-from : " type=registry,ref=ghcr.io/linalinn/kicad-render:cache-${{ github.ref_name }}"
48
+ load : true
49
+ tags : " ghcr.io/linalinn/kicad-render:${{ github.ref_name }}"
50
+
51
+ - name : simple render
52
+ run : docker run -v ${GITHUB_WORKSPACE}:/pwd --rm ghcr.io/linalinn/kicad-render:${{ github.ref_name }} render-pcb.sh -f "/pwd/.github/tests/test pcb/test.kicad_pcb"
53
+ - name : simple render - test file created
54
+ run : test -s "${GITHUB_WORKSPACE}/.github/tests/test pcb/test_top.png"
55
+
56
+ - name : simple render with output path
57
+ run : docker run -v ${GITHUB_WORKSPACE}:/pwd --rm ghcr.io/linalinn/kicad-render:${{ github.ref_name }} render-pcb.sh -f "/pwd/.github/tests/test pcb/test.kicad_pcb" -o "/pwd/images"
58
+ - name : simple render with output path - test file created
59
+ run : test -s "${GITHUB_WORKSPACE}/images/top.png"
60
+
61
+ - name : simple render with filename prefix
62
+ run : docker run -v ${GITHUB_WORKSPACE}:/pwd --rm ghcr.io/linalinn/kicad-render:${{ github.ref_name }} render-pcb.sh -f "/pwd/.github/tests/test pcb/test.kicad_pcb" -p fp
63
+ - name : simple render with filename prefix - test file created
64
+ run : test -s "${GITHUB_WORKSPACE}/.github/tests/test pcb/fp_top.png"
65
+
66
+ - name : simple render with output path and filename prefix
67
+ run : docker run -v ${GITHUB_WORKSPACE}:/pwd --rm ghcr.io/linalinn/kicad-render:${{ github.ref_name }} render-pcb.sh -f "/pwd/.github/tests/test pcb/test.kicad_pcb" -o "/pwd/images" -p fp
68
+ - name : simple render with output path and filename prefix - test file created
69
+ run : test -s "${GITHUB_WORKSPACE}/images/fp_top.png"
70
+
71
+ - name : simple render with zoom
72
+ run : docker run -v ${GITHUB_WORKSPACE}:/pwd --rm ghcr.io/linalinn/kicad-render:${{ github.ref_name }} render-pcb.sh -f "/pwd/.github/tests/test pcb/test.kicad_pcb" -o "/pwd/images" -z "0.5"
73
+ - name : simple render with zoom - test file created
74
+ run : test -s "${GITHUB_WORKSPACE}/images/top.png"
75
+
76
+ - name : render with animation
77
+ run : docker run -v ${GITHUB_WORKSPACE}:/pwd --rm ghcr.io/linalinn/kicad-render:${{ github.ref_name }} render-pcb.sh -f "/pwd/.github/tests/test pcb/test.kicad_pcb" -o "/pwd/images" -a "gif"
78
+ - name : render with animation- test file created
79
+ run : test -s "${GITHUB_WORKSPACE}/images/rotating.gif"
80
+
81
+ - name : Archive test renders
82
+ if : always()
83
+ uses : actions/upload-artifact@v4
84
+ with :
85
+ name : test-renders
86
+ path : ${GITHUB_WORKSPACE}/images
87
+
88
+ - name : push docker image dev
89
+ if : github.ref_name != github.event.repository.default_branch
90
+ run : |
91
+ docker tag ghcr.io/linalinn/kicad-render:${{ github.ref_name }} ghcr.io/linalinn/kicad-render:9.0-dev-${{ github.ref_name }}
92
+ docker tag ghcr.io/linalinn/kicad-render:${{ github.ref_name }} ghcr.io/linalinn/kicad-render:9.0-dev-${{ steps.date.outputs.date }}
93
+ docker push ghcr.io/linalinn/kicad-render:9.0-dev-${{ github.ref_name }}
94
+ docker push ghcr.io/linalinn/kicad-render:9.0-dev-${{ steps.date.outputs.date }}
95
+
96
+ - name : push docker image
97
+ if : github.ref_name == github.event.repository.default_branch
98
+ run : |
99
+ docker tag ghcr.io/linalinn/kicad-render:${{ github.ref_name }} ghcr.io/linalinn/kicad-render:9.0
100
+ docker tag ghcr.io/linalinn/kicad-render:${{ github.ref_name }} ghcr.io/linalinn/kicad-render:9.0-${{ steps.date.outputs.date }}
101
+ docker push ghcr.io/linalinn/kicad-render:9.0
102
+ docker push ghcr.io/linalinn/kicad-render:9.0-${{ steps.date.outputs.date }}
0 commit comments