mirror of
https://github.com/x-tools-author/x-tools.git
synced 2025-09-15 15:28:40 +08:00
36 lines
1.3 KiB
YAML
36 lines
1.3 KiB
YAML
name: build-docker(windows)
|
|
on:
|
|
workflow_dispatch: # Enables manually
|
|
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
CR_PAT: ${{ secrets.CR_PAT }}
|
|
QT_MODULES: 'qtcharts qtserialbus qtserialport qtwebsockets'
|
|
QT_VERSION: 6.8.3
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: windows-2022
|
|
steps:
|
|
- name: Pull respository
|
|
uses: actions/checkout@v4
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v3
|
|
with:
|
|
aqtversion: '==3.1.*'
|
|
dir: ${{ github.workspace }}
|
|
version: ${{ env.QT_VERSION }}
|
|
target: desktop
|
|
arch: win64_msvc2022_64
|
|
modules: ${{ env.QT_MODULES }}
|
|
- name: Build docker image
|
|
run: | #https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md
|
|
docker build -t x-tools-windows-2022:amd64 . -f docker/win-ltsc2022/Dockerfile
|
|
- name: Push docker image to github registry
|
|
run: |
|
|
dir c:
|
|
echo ${{ env.CR_PAT }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
|
docker rmi ghcr.io/x-tools-author/x-tools-windows-2022:amd64 || true
|
|
docker tag x-tools-windows-2022:amd64 ghcr.io/x-tools-author/x-tools-windows-2022:amd64
|
|
docker push ghcr.io/x-tools-author/x-tools-windows-2022:amd64 |