From bb90422b4af34b0ed74874d137fa79953b191206 Mon Sep 17 00:00:00 2001 From: Marijn Doeve Date: Fri, 7 Nov 2025 09:31:46 +0100 Subject: [PATCH] Container --- .gitea/workflows/ci.yaml | 44 ++++++++++++++++++++++++++++++++++++ containers/web/Containerfile | 8 +++++++ 2 files changed, 52 insertions(+) create mode 100644 .gitea/workflows/ci.yaml create mode 100644 containers/web/Containerfile diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..37d9a89 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,44 @@ +name: release-tag + +on: + push: + branches: [main] + +jobs: + release-image: + runs-on: ubuntu-latest + container: + image: ghcr.io/catthehacker/ubuntu:act-22.04 + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v3 + + - name: Login to Container Registry + uses: docker/login-action@v3 + with: + registry: gitea.marijndoeve.nl + username: ${{ gitea.repository_owner }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: gitea.marijndoeve.nl/${{github.repository_owner}}/dynmap-web + tags: | + # set latest tag for default branch + type=raw,value=latest,enable={{is_default_branch}} + + - name: Build and push + uses: docker/build-push-action@v6 + env: + ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 + with: + context: containers/web + file: containers/web/Containerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/containers/web/Containerfile b/containers/web/Containerfile new file mode 100644 index 0000000..8f6f103 --- /dev/null +++ b/containers/web/Containerfile @@ -0,0 +1,8 @@ +FROM php:8.4-apache + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + libpq-dev \ + && docker-php-ext-install pdo_pgsql \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ No newline at end of file