Skip to content

Commit 2e72a16

Browse files
committed
Setup CI to build Windows image
1 parent 8638cf3 commit 2e72a16

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
REGISTRY: "ghcr.io"
7+
IMAGE: "ghcr.io/librepcb/docker-librepcb-dev"
8+
9+
jobs:
10+
windows-x64:
11+
name: Windows x86_64
12+
runs-on: windows-2025
13+
env:
14+
TAG: "windowsservercore-ltsc2025-qt6.6-64bit"
15+
permissions:
16+
contents: read
17+
packages: write
18+
attestations: write
19+
id-token: write
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Docker Login
23+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login "${{ env.REGISTRY }}" -u "${{ github.actor }}" --password-stdin
24+
# First we pull the image to get it as a cache, which massively speeds up
25+
# the image build time (basically a no-op if the Dockerfile was not
26+
# modified). This step is allowed to fail, e.g. if the image doesn't
27+
# exist yet.
28+
- name: Docker Pull
29+
run: docker pull "${{ env.IMAGE }}:${{ env.TAG }}"
30+
continue-on-error: true
31+
- name: Docker Build
32+
run: docker build -t "${{ env.IMAGE }}:${{ env.TAG }}" "${{ env.TAG }}"
33+
- name: Docker Push
34+
run: docker push "${{ env.IMAGE }}:${{ env.TAG }}"

0 commit comments

Comments
 (0)