mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
ci: add workflow to build cross-compiler Docker image
This commit is contained in:
parent
6630fa5647
commit
dd7094e5d3
1 changed files with 69 additions and 0 deletions
69
.github/workflows/build-cross-image.yml
vendored
Normal file
69
.github/workflows/build-cross-image.yml
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
name: Build Cross-Compiler Image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
sdk_version:
|
||||
description: 'macOS SDK version'
|
||||
required: true
|
||||
default: '26.1'
|
||||
zig_version:
|
||||
description: 'Zig version'
|
||||
required: true
|
||||
default: '0.14.0'
|
||||
image_version:
|
||||
description: 'Image version tag'
|
||||
required: true
|
||||
default: '1.0.0'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: wailsapp/wails-cross
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout v3-alpha
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: v3-alpha
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=raw,value=${{ inputs.image_version }}
|
||||
type=raw,value=sdk-${{ inputs.sdk_version }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: v3/internal/setupwizard/docker
|
||||
file: v3/internal/setupwizard/docker/Dockerfile.cross
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
ZIG_VERSION=${{ inputs.zig_version }}
|
||||
MACOS_SDK_VERSION=${{ inputs.sdk_version }}
|
||||
IMAGE_VERSION=${{ inputs.image_version }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
Loading…
Add table
Add a link
Reference in a new issue