mirror of
https://github.com/stulzq/azure-openai-proxy.git
synced 2025-12-18 23:04:19 +01:00
chore: update docker
This commit is contained in:
21
.github/workflows/docker.yml
vendored
21
.github/workflows/docker.yml
vendored
@@ -16,13 +16,32 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to the GPR
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
tags: stulzq/azure-openai-proxy:${{ github.event.inputs.tags }}
|
pull: true
|
||||||
|
labels: |
|
||||||
|
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
|
||||||
|
org.opencontainers.image.revision=${{ github.sha }}
|
||||||
|
org.opencontainers.image.licenses=Apache-2.0
|
||||||
|
tags: |
|
||||||
|
${{ github.repository }}:${{ github.event.inputs.tags }}
|
||||||
|
# https://docs.docker.com/build/cache/backends/gha/
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
FROM golang:1.19 AS building
|
FROM golang:1.19 AS building
|
||||||
|
|
||||||
COPY . /building
|
COPY . /builder
|
||||||
WORKDIR /building
|
WORKDIR /builder
|
||||||
|
|
||||||
RUN make build
|
RUN make build
|
||||||
|
|
||||||
@@ -10,6 +10,6 @@ FROM alpine:3
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
COPY --from=building /building/bin .
|
COPY --from=builder /builder/bin .
|
||||||
|
|
||||||
ENTRYPOINT ["/app/azure-openai-proxy"]
|
ENTRYPOINT ["/app/azure-openai-proxy"]
|
||||||
Reference in New Issue
Block a user