Skip to content

Commit 55b67a4

Browse files
committed
Setup CI to build Windows image
1 parent 8638cf3 commit 55b67a4

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
# First we pull the image to get it as a cache, which massively speeds up
23+
# the image build time (basically a no-op if the Dockerfile was not
24+
# modified). This step is allowed to fail, e.g. if the image doesn't
25+
# exist yet.
26+
- name: Docker Pull
27+
run: docker pull "${{ env.IMAGE }}:${{ env.TAG }}"
28+
continue-on-error: true
29+
- name: Docker Build
30+
run: docker build -t "${{ env.IMAGE }}:${{ env.TAG }}-ci" "${{ env.TAG }}"
31+
- name: Docker Login
32+
if: ${{ success() && (github.event_name == 'push') }}
33+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login "${{ env.REGISTRY }}" -u "${{ github.actor }}" --password-stdin
34+
- name: Docker Push
35+
if: ${{ success() && (github.event_name == 'push') }}
36+
run: docker push "${{ env.IMAGE }}:${{ env.TAG }}-ci"

0 commit comments

Comments
 (0)