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>
35 lines
909 B
YAML
35 lines
909 B
YAML
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 }}"
|