add gitea actions ci, push docker image to registry
All checks were successful
Build and Push Docker Image / build (push) Successful in 25s
All checks were successful
Build and Push Docker Image / build (push) Successful in 25s
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 <noreply@anthropic.com>
This commit is contained in:
8
.dockerignore
Normal file
8
.dockerignore
Normal file
@@ -0,0 +1,8 @@
|
||||
node_modules/
|
||||
dist/
|
||||
data/
|
||||
.git/
|
||||
.gitea/
|
||||
.claude/
|
||||
.env*
|
||||
*.md
|
||||
34
.gitea/workflows/build.yml
Normal file
34
.gitea/workflows/build.yml
Normal file
@@ -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 }}"
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
netfelix-audio-fix:
|
||||
build: .
|
||||
image: git.felixfoertsch.de/felixfoertsch/netfelix-audio-fix:latest
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user