Build Electron Builder #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Electron Builder | |
on: | |
workflow_dispatch: | |
inputs: | |
gccVersion: | |
type: string | |
required: true | |
default: "13.3.0" | |
description: Gcc version to compile | |
libffiVersion: | |
type: string | |
required: true | |
default: "3.4.6" | |
description: Libffi version to compile | |
imageTag: | |
type: string | |
required: true | |
default: "deepin-23-glibc-238" | |
description: Tag of the builder image | |
jobs: | |
libgcc: | |
runs-on: [self-hosted, ryustation] | |
container: | |
image: ghcr.io/darkyzhou/electron-build-runner:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build libgcc | |
uses: docker/build-push-action@v5 | |
with: | |
load: true | |
tags: libgcc:latest | |
file: dockerfiles/Dockerfile.libgcc | |
context: dockerfiles | |
build-args: | | |
GCC_VERSION=${{ inputs.gccVersion }} | |
- name: Extract libgcc Artifact | |
uses: shrink/actions-docker-extract@v3 | |
with: | |
image: libgcc:latest | |
path: /root/build/libgcc.tar.gz | |
destination: dist | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libgcc | |
path: dist/libgcc.tar.gz | |
libffi: | |
runs-on: [self-hosted, ryustation] | |
container: | |
image: ghcr.io/darkyzhou/electron-build-runner:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build libffi | |
uses: docker/build-push-action@v5 | |
with: | |
load: true | |
tags: libffi:latest | |
file: dockerfiles/Dockerfile.libffi | |
context: dockerfiles | |
build-args: | | |
GCC_VERSION=${{ inputs.gccVersion }} | |
- name: Extract libffi Artifact | |
uses: shrink/actions-docker-extract@v3 | |
with: | |
image: libffi:latest | |
path: /root/build/libffi.tar.gz | |
destination: dist | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libffi | |
path: dist/libffi.tar.gz | |
builder: | |
needs: | |
- libgcc | |
- libffi | |
runs-on: [self-hosted, ryustation] | |
container: | |
image: ghcr.io/darkyzhou/electron-build-runner:latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: . | |
merge-multiple: true | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push Builder Image | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
context: . | |
file: dockerfiles/Dockerfile.builder | |
tags: ghcr.io/darkyzhou/electron-builder:${{ inputs.imageTag }} |