ci: remove docker workflow, simplify release triggers

- Remove docker.yml (no Docker image publishing needed)
- Release workflow now triggers on tag push and release creation
- Only linux-amd64 builds active, other architectures commented out
- Windows build commented out
This commit is contained in:
Sora39831 2026-04-02 10:18:45 +08:00
parent af7ed2a38f
commit f5c931426d
2 changed files with 23 additions and 78 deletions

View file

@ -1,62 +0,0 @@
name: Release 3X-UI for Docker
permissions:
contents: read
packages: write
on:
workflow_dispatch:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Docker meta
id: meta
uses: docker/metadata-action@v6
with:
images: |
hsanaeii/3x-ui
ghcr.io/Sora39831/3x-ui
tags: |
type=ref,event=branch
type=ref,event=tag
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
with:
install: true
- name: Login to Docker Hub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Login to GHCR
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
context: .
push: true
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/arm/v6,linux/386
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View file

@ -3,10 +3,11 @@ name: Release 3X-UI
on: on:
workflow_dispatch: workflow_dispatch:
push: push:
branches:
- '**'
tags: tags:
- "v*.*.*" - "v*.*.*"
release:
types: [created]
pull_request:
paths: paths:
- '**.js' - '**.js'
- '**.css' - '**.css'
@ -18,7 +19,6 @@ on:
- 'x-ui.service.debian' - 'x-ui.service.debian'
- 'x-ui.service.arch' - 'x-ui.service.arch'
- 'x-ui.service.rhel' - 'x-ui.service.rhel'
pull_request:
jobs: jobs:
analyze: analyze:
@ -66,12 +66,18 @@ jobs:
matrix: matrix:
platform: platform:
- amd64 - amd64
- arm64 # 手动注释,请勿更改
- armv7 # - arm64
- armv6 # 手动注释,请勿更改
- 386 # - armv7
- armv5 # 手动注释,请勿更改
- s390x # - armv6
# 手动注释,请勿更改
# - 386
# 手动注释,请勿更改
# - armv5
# 手动注释,请勿更改
# - s390x
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
@ -177,7 +183,7 @@ jobs:
- name: Upload files to GH release - name: Upload files to GH release
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') if: github.event_name == 'release'
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }} tag: ${{ github.ref_name }}
@ -197,7 +203,8 @@ jobs:
strategy: strategy:
matrix: matrix:
platform: platform:
- amd64 # 手动注释,请勿更改
# - amd64
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
@ -273,7 +280,7 @@ jobs:
- name: Upload files to GH release - name: Upload files to GH release
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') if: github.event_name == 'release'
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }} tag: ${{ github.ref_name }}