Skip to content

Commit 8e0ef8d

Browse files
committed
Build docker image for legacy proxy
Fixes #43
1 parent c262626 commit 8e0ef8d

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}/legacy-proxy
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-24.04
14+
permissions:
15+
contents: read
16+
packages: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.13'
23+
cache: 'pip'
24+
25+
- name: Log in to the Container registry
26+
if: github.event_name != 'pull_request'
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ${{ env.REGISTRY }}
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Extract metadata (tags, labels) for Docker
34+
id: meta
35+
uses: docker/metadata-action@v5
36+
with:
37+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
38+
39+
- name: Build and push Docker image
40+
uses: docker/build-push-action@v6
41+
with:
42+
context: ./legacy-proxy
43+
push: ${{ github.event_name != 'pull_request' }}
44+
tags: ${{ steps.meta.outputs.tags }}
45+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)