Skip to content

fix(api): 限制 openai_force_codex 仅管理员分组返回 #68

fix(api): 限制 openai_force_codex 仅管理员分组返回

fix(api): 限制 openai_force_codex 仅管理员分组返回 #68

Workflow file for this run

name: Docker Build
on:
push:
branches:
- main
- master
- dev
paths-ignore:
- '**.md'
- 'docs/**'
- '.gitignore'
workflow_dispatch:
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' }}
type=raw,value=dev,enable=${{ github.ref == 'refs/heads/dev' }}
type=sha,prefix=,format=short
type=raw,value={{date 'YYYYMMDD-HHmmss'}}
- name: Get commit info
id: commit
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=dev-${{ steps.commit.outputs.sha_short }}
COMMIT=${{ steps.commit.outputs.sha_short }}
DATE=${{ steps.commit.outputs.date }}
GOPROXY=https://proxy.golang.org,direct
GOSUMDB=sum.golang.org
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Image digest
run: echo "Image pushed with digest ${{ steps.meta.outputs.digest }}"