Files
plex-mcp/.gitea/workflows/docker-build.yml
Ben 06399c273b
Some checks failed
Build and Push Docker Image / build (push) Failing after 7s
Fix: Simplify Gitea Actions workflow to use docker runner
2025-12-28 05:29:04 +00:00

32 lines
900 B
YAML

name: Build and Push Docker Image
on:
push:
branches:
- main
tags:
- 'v*'
jobs:
build:
runs-on: docker
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract tag
id: extract
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "tag=latest" >> $GITHUB_OUTPUT
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
TAG=${GITHUB_REF#refs/tags/}
echo "tag=${TAG}" >> $GITHUB_OUTPUT
fi
- name: Build and Push Docker Image
run: |
docker build -t git.local.ben.io/b3nw/plex-mcp:${{ steps.extract.outputs.tag }} .
docker login -u ${{ secrets.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_PASSWORD }} git.local.ben.io
docker push git.local.ben.io/b3nw/plex-mcp:${{ steps.extract.outputs.tag }}