Skip to content

Commit fbcea1b

Browse files
committed
chore: update docker
1 parent 7b496c4 commit fbcea1b

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

.github/workflows/docker.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,32 @@ jobs:
1616
uses: docker/setup-qemu-action@v2
1717
- name: Set up Docker Buildx
1818
uses: docker/setup-buildx-action@v2
19+
1920
- name: Login to Docker Hub
2021
uses: docker/login-action@v2
2122
with:
2223
username: ${{ secrets.DOCKERHUB_USERNAME }}
2324
password: ${{ secrets.DOCKERHUB_TOKEN }}
25+
26+
- name: Login to the GPR
27+
uses: docker/login-action@v2
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.repository_owner }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
2433
- name: Build and push
2534
uses: docker/build-push-action@v4
2635
with:
36+
platforms: linux/amd64
2737
push: true
28-
tags: stulzq/azure-openai-proxy:${{ github.event.inputs.tags }}
38+
pull: true
39+
labels: |
40+
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
41+
org.opencontainers.image.revision=${{ github.sha }}
42+
org.opencontainers.image.licenses=Apache-2.0
43+
tags: |
44+
${{ github.repository }}:${{ github.event.inputs.tags }}
45+
# https://docs.docker.com/build/cache/backends/gha/
46+
cache-from: type=gha
47+
cache-to: type=gha,mode=max

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM golang:1.19 AS building
22

3-
COPY . /building
4-
WORKDIR /building
3+
COPY . /builder
4+
WORKDIR /builder
55

66
RUN make build
77

@@ -10,6 +10,6 @@ FROM alpine:3
1010
WORKDIR /app
1111

1212
EXPOSE 8080
13-
COPY --from=building /building/bin .
13+
COPY --from=builder /builder/bin .
1414

1515
ENTRYPOINT ["/app/azure-openai-proxy"]

0 commit comments

Comments
 (0)