Skip to content

fix: 添加 Docker Compose 支持和智能权限适配功能 #53

fix: 添加 Docker Compose 支持和智能权限适配功能

fix: 添加 Docker Compose 支持和智能权限适配功能 #53

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches: [ v17 ]
tags:
- 'v*'
paths-ignore:
- 'README.md'
- 'docs/**'
- '*.md'
pull_request:
branches: [ v17 ]
paths-ignore:
- 'README.md'
- 'docs/**'
- '*.md'
jobs:
build:
runs-on: ubuntu-latest
# 检查是否应该跳过构建
if: |
!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.head_commit.message, '[no build]') &&
!contains(github.event.head_commit.message, '[docs only]')
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: eyeix/postgres-zh
tags: |
type=ref,event=tag
type=sha,format=short
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max