Skip to content

Commit

Permalink
Move to using GHCR
Browse files Browse the repository at this point in the history
  • Loading branch information
rtm516 committed Sep 13, 2023
1 parent f97f4f5 commit 4cda045
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-pterodactyl-geyser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build pterodactyl-geyser

on:
workflow_dispatch:
push:
branches:
- 'master'
paths:
- '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@v3

- 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: Build the Docker image
run: |
docker build $DOCKER_CONTAINER/ --tag $DOCKER_CONTAINER:latest
docker tag $DOCKER_CONTAINER:latest ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER:latest
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Push to GHCR
run: |
docker push ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER:latest
40 changes: 40 additions & 0 deletions .github/workflows/build-pterodactyl-geyserconnect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build pterodactyl-geyserconnect

on:
workflow_dispatch:
push:
branches:
- 'master'
paths:
- 'pterodactyl-geyserconnect/**'
- '!pterodactyl-geyserconnect/README.md'

env:
DOCKER_OWNER: ${{ github.repository_owner }}
DOCKER_CONTAINER: pterodactyl-geyserconnect

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- 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: Build the Docker image
run: |
docker build $DOCKER_CONTAINER/ --tag $DOCKER_CONTAINER:latest
docker tag $DOCKER_CONTAINER:latest ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER:latest
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Push to GHCR
run: |
docker push ghcr.io/$DOCKER_OWNER/$DOCKER_CONTAINER:latest
4 changes: 2 additions & 2 deletions README.MD → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This repo contains the eggs for GeyserMC and the docker images for auto update s
## Geyser
### Geyser: Standalone
* Egg: `egg-geyser-m-c.json`
* Container: [`docker-geyser`](https://github.com/GeyserMC/pterodactyl-stuff/tree/docker-geyser)
* Container: [`docker-geyser`](https://github.com/GeyserMC/pterodactyl-stuff/pkgs/container/pterodactyl-geyser)

### Geyser: Spigot + [PaperMC](https://papermc.io/)
* Egg: `egg-paper--geyser--floodgate.json`
Expand All @@ -14,4 +14,4 @@ This repo contains the eggs for GeyserMC and the docker images for auto update s

## GeyserConnect
* Egg: `egg-geyser-connect.json`
* Container: [`docker-geyserconnect`](https://github.com/GeyserMC/pterodactyl-stuff/tree/docker-geyserconnect)
* Container: [`docker-geyserconnect`](https://github.com/GeyserMC/pterodactyl-stuff/pkgs/container/pterodactyl-geyserconnect)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4cda045

Please sign in to comment.