Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

还原部分代码片段 并尝试修复 (#3) #68

还原部分代码片段 并尝试修复 (#3)

还原部分代码片段 并尝试修复 (#3) #68

on:
push:
branches:
- dev
- test-builds
- actions-testing
name: 持续交付
jobs:
buildNightlyDocker:
name: 构建并提交Docker镜像
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: 设置 QEMU
uses: docker/setup-qemu-action@v2
- name: 设置 Docker Buildx
uses: docker/setup-buildx-action@v2
- uses: actions/cache@v3
with:
path: /tmp/buildxcache
key: ${{ runner.os }}-docker-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-docker-buildx-
- name: Docker 登录
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: |
echo "${DOCKER_PASSWORD}" | docker login -u ${DOCKER_USERNAME} --password-stdin
- name: 构建/推送 LANraragi for Docker 每日构建
run: |
git submodule init
git submodule update
docker buildx build \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
--output "type=image,push=true" \
--tag windycloud/lanraragi_cn:dev \
--cache-from "type=local,src=/tmp/buildxcache" \
--cache-to "type=local,dest=/tmp/buildxcache" \
--file ./tools/build/docker/Dockerfile .
exportDockerRootFS:
name: 为 Windows 构建构建并导出 Docker rootfs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Docker 构建和导出
run: |
git submodule init
git submodule update
docker build -t windycloud/lanraragi_cn:dev -f ./tools/build/docker/Dockerfile --build-arg INSTALL_PARAMETER=-w .
docker create --name rootfs windycloud/lanraragi_cn:dev
docker export --output=package.tar rootfs
- name: 上传 rootfs
uses: actions/upload-artifact@v1
with:
name: package
path: package.tar
buildNightlyWSL:
name: 构建 Windows 包
needs: exportDockerRootFS
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: 下载包
uses: actions/download-artifact@v1
with:
name: package
- name: 构建MSI安装程序
shell: powershell
run: |
[array]$installPath = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -property installationpath
# Get first line of installPath in case we have multiple VS installs
Import-Module (Join-Path $installPath[0] "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
# Import the VS shell module
Enter-VsDevShell -VsInstallPath $installPath[0] -SkipAutomaticLocation
$ErrorActionPreference = 'Continue'
git submodule init
git submodule update
choco install nuget.commandline
./tools/build/windows/build.ps1
- name: 上传安装程序
uses: actions/upload-artifact@v1
with:
name: LANraragi.msi
path: ./tools/build/windows/Karen/Setup/bin/LANraragi.msi