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:
push:
branches: ["main"]
branches: ["master"]
# Publish semver tags as releases.
tags: ["v*.*.*"]
pull_request:
branches: ["main"]
branches: ["master"]
schedule:
- cron: "0 1 * * *"
workflow_dispatch:
env:
# # Use docker.io for Docker Hub if empty
REGISTRY: gitea.marijndoeve.nl
# REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ gitea.repository }}
GITHUB_TOKEB: ""
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
@@ -30,35 +29,38 @@ jobs:
- name: Checkout repository
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
uses: docker/setup-buildx-action@v2
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: gitea.event_name != 'pull_request'
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
# - name: Extract Docker metadata
# id: meta
# uses: docker/metadata-action@v4
# with:
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
file: docker/web/Containerfile
push: ${{ gitea.event_name != 'pull_request' }}
tags: latest
push: ${{ github.event_name != 'pull_request' }}
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:
- "24454:24454/udp" # Voice mod
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"
# Server
EULA: "TRUE"
TYPE: FABRIC
VERSION: 1.20.1
VERSION: 1.19.3
INIT_MEMORY: 1G
MAX_MEMORY: 12G
TZ: Europe/Amsterdam
@@ -93,7 +93,7 @@ services:
SEED: 7644964991330705000
SPAWN_PROTECTION: 0
MAX_TICK_TIME: -1
MOTD: "One Minecraft Boys 3: Harmitcraft (1.20!)"
MOTD: "One Minecraft Boys 3: Harmitcraft"
restart: unless-stopped
volumes:
- /opt/omb3/data:/data

View File

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