From 36080951ef705f2a34acf8bd06fd033e0afea512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20F=C3=B6rtsch?= Date: Mon, 2 Mar 2026 22:58:52 +0100 Subject: [PATCH] add gitea actions ci, push docker image to registry workflow builds on push to main, tags with latest + calver from package.json, pushes to git.felixfoertsch.de container registry. docker-compose.yml now pulls from registry instead of building locally. Co-Authored-By: Claude Opus 4.6 --- .dockerignore | 8 ++++++++ .gitea/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ docker-compose.yml | 2 +- 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .dockerignore create mode 100644 .gitea/workflows/build.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4fd46bb --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +node_modules/ +dist/ +data/ +.git/ +.gitea/ +.claude/ +.env* +*.md diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..5e73f03 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,34 @@ +name: Build and Push Docker Image + +on: + push: + branches: [main] + +env: + REGISTRY: git.felixfoertsch.de + IMAGE: felixfoertsch/netfelix-audio-fix + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Log in to Gitea Container Registry + run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "$REGISTRY" -u "${{ github.actor }}" --password-stdin + + - name: Extract version from package.json + id: meta + run: echo "version=$(jq -r .version package.json)" >> "$GITHUB_OUTPUT" + + - name: Build image + run: | + docker build \ + -t "$REGISTRY/$IMAGE:latest" \ + -t "$REGISTRY/$IMAGE:${{ steps.meta.outputs.version }}" \ + . + + - name: Push image + run: | + docker push "$REGISTRY/$IMAGE:latest" + docker push "$REGISTRY/$IMAGE:${{ steps.meta.outputs.version }}" diff --git a/docker-compose.yml b/docker-compose.yml index 14daa07..26b920d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: netfelix-audio-fix: - build: . + image: git.felixfoertsch.de/felixfoertsch/netfelix-audio-fix:latest ports: - "3000:3000" volumes: