Build Electron Images #144
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 Images | |
on: | |
workflow_dispatch: | |
inputs: | |
is_test: | |
description: "Test run" | |
required: true | |
type: boolean | |
default: false | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
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 |