Skip to content

feat: 更新 Dockerfile 以支持 Pig 环境管理器 #22

feat: 更新 Dockerfile 以支持 Pig 环境管理器

feat: 更新 Dockerfile 以支持 Pig 环境管理器 #22

Workflow file for this run

name: Build and Push PostgreSQL 16 Image
on:
push:
branches: [ v16 ]
paths-ignore:
- 'README.md'
- 'docs/**'
- '*.md'
- 'test-examples.sql'
pull_request:
branches: [ v16 ]
paths-ignore:
- 'README.md'
- 'docs/**'
- '*.md'
- 'test-examples.sql'
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: riccoxie/postgres-zh
tags: |
type=ref,event=branch
type=ref,event=tag
type=sha,format=short
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm/v5,linux/arm64,linux/ppc64le,linux/s390x
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