chore: update docker compose image

This commit is contained in:
Ran
2026-02-24 00:08:36 +08:00
parent 65c4d6f793
commit 0239d395e2
6 changed files with 169 additions and 28 deletions
+7 -5
View File
@@ -3,11 +3,13 @@ name: Docker
on:
push:
branches: [main]
tags: ["v*.*.*"]
tags: ["v*"]
paths-ignore:
- "docs/**"
- "**.md"
- "devenv/**"
release:
types: [published]
pull_request:
branches: [main]
paths-ignore:
@@ -52,7 +54,7 @@ jobs:
ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}
tags: |
type=raw,value=dev,enable=${{ github.ref == 'refs/heads/main' }}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref_name, '-') }}
type=raw,value=latest,enable=${{ github.event_name == 'release' || (startsWith(github.ref, 'refs/tags/') && !contains(github.ref_name, '-')) }}
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
@@ -71,14 +73,14 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name == 'push'
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
if: github.event_name == 'push'
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
@@ -90,7 +92,7 @@ jobs:
with:
context: .
file: ${{ matrix.dockerfile }}
push: ${{ github.event_name == 'push' }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64' || 'linux/amd64' }}