-
-
Notifications
You must be signed in to change notification settings - Fork 36
46 lines (37 loc) · 1.44 KB
/
build-pterodactyl-geyser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Build pterodactyl-geyser
on:
workflow_dispatch:
push:
branches:
- 'master'
paths:
- '.github/workflows/build-pterodactyl-geyser.yml'
- 'pterodactyl-geyser/**'
- '!pterodactyl-geyser/README.md'
env:
DOCKER_OWNER: ${{ github.repository_owner }}
DOCKER_CONTAINER: pterodactyl-geyser
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # 4.0.0
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Fix Docker environment variables
run: |
# Make lowercase
echo "DOCKER_OWNER=$(echo $DOCKER_OWNER | tr '[A-Z]' '[a-z]')" >> $GITHUB_ENV
echo "DOCKER_CONTAINER=$(echo $DOCKER_CONTAINER | tr '[A-Z]' '[a-z]')" >> $GITHUB_ENV
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Build and push
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: ${{ env.DOCKER_CONTAINER }}/
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ env.DOCKER_OWNER }}/${{ env.DOCKER_CONTAINER }}:latest