From 7f4113d4edc8e08a6bba3ed70bc14e3c5144f4e3 Mon Sep 17 00:00:00 2001 From: Marijn Doeve Date: Wed, 6 Mar 2024 19:44:57 +0100 Subject: [PATCH] Test build --- .gitea/workflows/release-tag.yml | 47 ++++++++++++++++++++++++++++++++ compose.yaml | 0 containers/web/Containerfile | 5 ++++ 3 files changed, 52 insertions(+) create mode 100644 .gitea/workflows/release-tag.yml create mode 100644 compose.yaml create mode 100644 containers/web/Containerfile diff --git a/.gitea/workflows/release-tag.yml b/.gitea/workflows/release-tag.yml new file mode 100644 index 0000000..3639d79 --- /dev/null +++ b/.gitea/workflows/release-tag.yml @@ -0,0 +1,47 @@ +name: release-tag + +on: + push: + branches: [ main ] + +jobs: + release-image: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-22.04 + env: + DOCKER_LATEST: latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # all history for all branches and tags + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v2 + + - name: Login to Container Registry + uses: docker/login-action@v3 + with: + registry: gitea.marijndoeve.nl + username: ${{ gitea.repository_owner }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Get Meta + id: meta + run: | + echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT + + - name: Build and push + uses: docker/build-push-action@v5 + env: + ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 + IMAGE_NAME: gitea.marijndoeve.nl/Harmitcraft/${{ steps.meta.outputs.REPO_NAME }} + with: + context: containers/web + file: ./Containerfile + platforms: | + linux/amd64 + push: true + tags: | + ${{ env.IMAGE_NAME }}:${{ env.DOCKER_LATEST }} diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..e69de29 diff --git a/containers/web/Containerfile b/containers/web/Containerfile new file mode 100644 index 0000000..1419661 --- /dev/null +++ b/containers/web/Containerfile @@ -0,0 +1,5 @@ +FROM php:8.3-apache + +RUN apt-get update \ + && apt-get install -y libpq-dev \ + && docker-php-ext-install pdo_pgsql