Skip to content

Commit 9ffb5d2

Browse files
committed
Add support for automated docker builds
1 parent 7df3c1d commit 9ffb5d2

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/docker.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish Docker Image
2+
on:
3+
push:
4+
branches:
5+
- 'develop'
6+
tags:
7+
- 'v*'
8+
jobs:
9+
push_to_registry:
10+
name: Push Image to Github Packages
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: docker/setup-qemu-action@v1
15+
- uses: docker/setup-buildx-action@v1
16+
- uses: docker/login-action@v1
17+
with:
18+
registry: ghcr.io
19+
username: ${{ github.repository_owner }}
20+
password: ${{ secrets.REGISTRY_TOKEN }}
21+
- name: Release Production Build
22+
uses: docker/build-push-action@v2
23+
if: contains(github.ref, 'develop') != true
24+
env:
25+
GITHUB_REF: ${{ github.ref }}
26+
with:
27+
push: true
28+
tags: |
29+
ghcr.io/pterodactyl/panel:latest
30+
ghcr.io/pterodactyl/panel:${GITHUB_REF}
31+
- name: Release Development Build
32+
uses: docker/build-push-action@v2
33+
if: contains(github.ref, 'develop')
34+
with:
35+
push: true
36+
tags: |
37+
ghcr.io/pterodactyl/panel:develop

0 commit comments

Comments
 (0)