Skip to content

Build Electron Images #147

Build Electron Images

Build Electron Images #147

Workflow file for this run

name: Build Electron Images
on:
workflow_dispatch:
inputs:
is_test:
description: "Test run"
required: true
type: boolean
default: false
jobs:
Build:
runs-on: ubuntu-latest
env:
repo: electron
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
ALIYUN_USERNAME: ${{ secrets.ALIYUN_USERNAME }}
ALIYUN_PASSWORD: ${{ secrets.ALIYUN_PASSWORD }}
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to docker.io
uses: docker/login-action@v2
with:
registry: docker.io
username: docworld
password: ${{ secrets.DOCKER_TOKEN }}
- name: Login to Aliyuncs
uses: docker/login-action@v2
with:
registry: registry.cn-beijing.aliyuncs.com
username: ${{ secrets.ALIYUN_USERNAME }}
password: ${{ secrets.ALIYUN_PASSWORD }}
- name: Get tag version
uses: ikrong/[email protected]
with:
function: fetch
params: '["https://api.github.com/repos/electron/electron/releases/latest","get",["tag_name"]]'
- name: Copy Tools
run: |
cp -r tools ./electron
./tools/install.sh
NODE_PATH=$(npm root --quiet -g) node ./tools/prepare.js repo-revision electron/website
- if: ${{ !inputs.is_test }}
name: Build electron doc
uses: docker/[email protected]
with:
platforms: linux/amd64,linux/arm64
context: ./electron/
push: true
build-args: |
CROWDIN_PERSONAL_TOKEN=${{secrets.CROWDIN_PERSONAL_TOKEN}}
DOCWORLD_SOURCE=${{ env.DOCWORLD_SOURCE }}
tags: |
docworld/electron:latest
docworld/electron:${{ env.tag_name }}
registry.cn-beijing.aliyuncs.com/docworld/electron:latest
registry.cn-beijing.aliyuncs.com/docworld/electron:${{ env.tag_name }}
- if: ${{ inputs.is_test }}
name: Build electron doc
uses: docker/[email protected]
with:
platforms: linux/amd64,linux/arm64
context: ./electron/
push: true
build-args: |
CROWDIN_PERSONAL_TOKEN=${{secrets.CROWDIN_PERSONAL_TOKEN}}
DOCWORLD_SOURCE=${{ env.DOCWORLD_SOURCE }}
tags: registry.cn-beijing.aliyuncs.com/ikrong/docworld:electron
UpdateDockerDescription:
if: ${{ !inputs.is_test }}
needs: [Build]
uses: ikrong/documents/.github/workflows/_updateDocker.yml@main
with:
repoName: electron
secrets: inherit