Compare commits

..

1 Commits

Author SHA1 Message Date
96610389e3 Test runner gitea 2023-04-09 17:16:55 +02:00
3 changed files with 24 additions and 22 deletions

View File

@@ -1,22 +1,21 @@
name: Build name: Build and Deploy
on: on:
push: push:
branches: ["main"] branches: ["master"]
# Publish semver tags as releases. # Publish semver tags as releases.
tags: ["v*.*.*"] tags: ["v*.*.*"]
pull_request: pull_request:
branches: ["main"] branches: ["master"]
schedule: schedule:
- cron: "0 1 * * *" - cron: "0 1 * * *"
workflow_dispatch: workflow_dispatch:
env: env:
# # Use docker.io for Docker Hub if empty # # Use docker.io for Docker Hub if empty
REGISTRY: gitea.marijndoeve.nl # REGISTRY: ghcr.io
# github.repository as <account>/<repo> # github.repository as <account>/<repo>
IMAGE_NAME: ${{ gitea.repository }} IMAGE_NAME: ${{ github.repository }}
GITHUB_TOKEB: ""
jobs: jobs:
build: build:
@@ -30,35 +29,38 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
# Workaround: https://gitea.com/docker/build-push-action/issues/461 # Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx - name: Setup Docker buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
# Login against a Docker registry except on PR # Login against a Docker registry except on PR
# https://github.com/docker/login-action # https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }} - name: Log into registry ${{ env.REGISTRY }}
if: gitea.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITEA_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker # Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action # https://github.com/docker/metadata-action
# - name: Extract Docker metadata - name: Extract Docker metadata
# id: meta id: meta
# uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
# with: with:
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Build and push Docker image with Buildx (don't push on PR) # Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image - name: Build and push Docker image
id: build-and-push id: build-and-push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
with: with:
context: . context: .
file: docker/web/Containerfile file: docker/web/Containerfile
push: ${{ gitea.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

View File

@@ -72,12 +72,12 @@ services:
ports: ports:
- "24454:24454/udp" # Voice mod - "24454:24454/udp" # Voice mod
environment: environment:
MODRINTH_PROJECTS: "fabric-api,lithium,view-distance-fix,shulkerboxtooltip,simple-voice-chat,audioplayer" MODRINTH_PROJECTS: "fabric-api,lithium,phosphor,view-distance-fix,shulkerboxtooltip,simple-voice-chat,audioplayer"
MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES: "FALSE" MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES: "FALSE"
# Server # Server
EULA: "TRUE" EULA: "TRUE"
TYPE: FABRIC TYPE: FABRIC
VERSION: 1.20.1 VERSION: 1.19.3
INIT_MEMORY: 1G INIT_MEMORY: 1G
MAX_MEMORY: 12G MAX_MEMORY: 12G
TZ: Europe/Amsterdam TZ: Europe/Amsterdam
@@ -93,7 +93,7 @@ services:
SEED: 7644964991330705000 SEED: 7644964991330705000
SPAWN_PROTECTION: 0 SPAWN_PROTECTION: 0
MAX_TICK_TIME: -1 MAX_TICK_TIME: -1
MOTD: "One Minecraft Boys 3: Harmitcraft (1.20!)" MOTD: "One Minecraft Boys 3: Harmitcraft"
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- /opt/omb3/data:/data - /opt/omb3/data:/data

View File

@@ -2,4 +2,4 @@ FROM php:8.2-apache
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y libpq-dev \ && apt-get install -y libpq-dev \
&& docker-php-ext-install pdo_pgsql && docker-php-ext-install pdo_psql