Skip to content

Commit e1c497a

Browse files
committed
Add Docker autopush to GHCR
1 parent 02d6e0e commit e1c497a

3 files changed

Lines changed: 51 additions & 29 deletions

File tree

.github/workflows/docker.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release for Docker
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "v*.*.*"
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check out the code
15+
uses: actions/checkout@v4
16+
with:
17+
submodules: true
18+
19+
- name: Docker meta
20+
id: meta
21+
uses: docker/metadata-action@v5
22+
with:
23+
images: |
24+
ghcr.io/triangle-org/engine
25+
tags: |
26+
type=ref,event=branch
27+
type=ref,event=tag
28+
type=pep440,pattern={{version}}
29+
30+
- name: Set up QEMU
31+
uses: docker/setup-qemu-action@v3
32+
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v3
35+
36+
- name: Login to GHCR
37+
uses: docker/login-action@v3
38+
with:
39+
registry: ghcr.io
40+
username: ${{ github.repository_owner }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Build and push Docker image
44+
uses: docker/build-push-action@v6
45+
with:
46+
context: .
47+
push: true
48+
platforms: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/arm/v6, linux/386
49+
tags: ${{ steps.meta.outputs.tags }}
50+
labels: ${{ steps.meta.outputs.labels }}

docker/Dockerfile renamed to Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ RUN pecl install ev event uv && \
4545

4646
WORKDIR /opt/triangle
4747

48-
COPY php.ini /etc/php/8.3/cli/
48+
COPY docker/php.ini /etc/php/8.3/cli/
4949

5050
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
5151
RUN composer create-project triangle/web /opt/triangle && \

docker/build.sh

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)