|
@@ -0,0 +1,54 @@
|
|
|
+name: Docker publish (multi-arch)
|
|
|
+
|
|
|
+on:
|
|
|
+ push:
|
|
|
+ branches: ["fix/**", "feat/**", "docker/**"]
|
|
|
+ pull_request:
|
|
|
+ branches: ["main"]
|
|
|
+
|
|
|
+jobs:
|
|
|
+ build:
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ permissions:
|
|
|
+ contents: read
|
|
|
+ packages: write
|
|
|
+ env:
|
|
|
+ IMAGE: ghcr.io/${{ github.repository_owner }}/open-webui
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v4
|
|
|
+
|
|
|
+ - name: Set up QEMU
|
|
|
+ uses: docker/setup-qemu-action@v3
|
|
|
+
|
|
|
+ - name: Set up Buildx
|
|
|
+ uses: docker/setup-buildx-action@v3
|
|
|
+
|
|
|
+ - name: Docker metadata
|
|
|
+ id: meta
|
|
|
+ uses: docker/metadata-action@v5
|
|
|
+ with:
|
|
|
+ images: ${{ env.IMAGE }}
|
|
|
+ tags: |
|
|
|
+ type=ref,event=branch
|
|
|
+ type=sha
|
|
|
+ type=raw,value=uidfix,enable=${{ startsWith(github.ref, 'refs/heads/fix/') }}
|
|
|
+
|
|
|
+ - name: Login to GHCR (skip on PR)
|
|
|
+ if: ${{ github.event_name != 'pull_request' }}
|
|
|
+ uses: docker/login-action@v3
|
|
|
+ with:
|
|
|
+ registry: ghcr.io
|
|
|
+ username: ${{ github.repository_owner }}
|
|
|
+ password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
+
|
|
|
+ - name: Build (PR) / Build & Push (branch)
|
|
|
+ uses: docker/build-push-action@v6
|
|
|
+ with:
|
|
|
+ context: .
|
|
|
+ file: ./Dockerfile
|
|
|
+ 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
|