mirror of
https://github.com/chaos-zhu/easynode.git
synced 2026-06-23 00:41:02 +08:00
- native-android-release.yml: build/sign/verify APK+AAB, upload artifact & release - docker-builder.yml: skip native-/client releases to avoid clobbering latest image - native/README.md: document CI secrets, triggers, signing verification
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: Build Server to DockerHub
|
||
|
||
on:
|
||
release:
|
||
types: [published]
|
||
workflow_dispatch:
|
||
inputs:
|
||
tag_name:
|
||
description: 'Tag Name (leave empty for default latest)'
|
||
required: false
|
||
default: 'latest'
|
||
jobs:
|
||
build-and-push:
|
||
runs-on: ubuntu-latest
|
||
# 仅构建 server 正式版;跳过 native-* / client* 的 Release,避免误构建并覆盖 latest 镜像
|
||
if: >-
|
||
github.event_name == 'workflow_dispatch' ||
|
||
(!startsWith(github.event.release.tag_name, 'native-') &&
|
||
!startsWith(github.event.release.tag_name, 'client'))
|
||
steps:
|
||
- name: Check out the repository
|
||
uses: actions/checkout@v3
|
||
|
||
- name: Log in to Docker Hub
|
||
uses: docker/login-action@v2
|
||
with:
|
||
username: ${{ secrets.DOCKER_USERNAME }}
|
||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||
|
||
- name: Set up Docker Buildx
|
||
uses: docker/setup-buildx-action@v2
|
||
|
||
- name: Build and push Docker image
|
||
uses: docker/build-push-action@v3
|
||
with:
|
||
context: .
|
||
file: ./Dockerfile
|
||
push: true
|
||
platforms: linux/amd64,linux/arm64
|
||
tags: |
|
||
chaoszhu/easynode:${{ github.event.release.tag_name || inputs.tag_name }}
|
||
chaoszhu/easynode:latest
|
||
|
||
# - name: Clean up post-build
|
||
# run: docker system prune -af
|