Skip to content

Commit 69d8eee

Browse files
SukuWcclaude
andcommitted
Add hosted electrical builder image based on kicad_auto
- Add docker/electrical-builder/Dockerfile extending setsoft/kicad_auto:ki8 - Add build_electrical_builder_image workflow to build and push to GHCR - Update electrical_boards workflow to pull from GHCR instead of Docker Hub Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3bad55a commit 69d8eee

3 files changed

Lines changed: 53 additions & 1 deletion

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: build_electrical_builder_image
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- 'docker/electrical-builder/Dockerfile'
8+
9+
jobs:
10+
build-and-push:
11+
name: Build and push electrical builder image
12+
runs-on: ubuntu-latest
13+
permissions:
14+
packages: write
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Log in 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: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
30+
- name: Extract metadata
31+
id: meta
32+
uses: docker/metadata-action@v5
33+
with:
34+
images: ghcr.io/${{ github.repository_owner }}/knot-electrical-builder
35+
tags: |
36+
type=raw,value=latest
37+
type=sha,prefix=sha-,format=short
38+
39+
- name: Build and push
40+
uses: docker/build-push-action@v5
41+
with:
42+
context: .
43+
file: docker/electrical-builder/Dockerfile
44+
push: true
45+
tags: ${{ steps.meta.outputs.tags }}
46+
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/knot-electrical-builder:buildcache
47+
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/knot-electrical-builder:buildcache,mode=max

.github/workflows/electrical_boards.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ jobs:
1313
generate-artifacts:
1414
name: kicad export
1515
runs-on: ubuntu-latest
16-
container: "setsoft/kicad_auto:ki8"
16+
container:
17+
image: ghcr.io/${{ github.repository_owner }}/knot-electrical-builder:latest
18+
credentials:
19+
username: ${{ github.actor }}
20+
password: ${{ secrets.GITHUB_TOKEN }}
1721
strategy:
1822
fail-fast: false
1923
matrix:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM docker.io/setsoft/kicad_auto:ki8

0 commit comments

Comments
 (0)