Fix Gitea action Docker build tag error

- Add fallback registry to prevent invalid tag format
- Make Docker login conditional on secrets being present
- Make push conditional on registry being configured
- Rename Docker image from calendar to runway

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Connor Johnstone
2025-09-02 12:32:34 -04:00
parent a7ebbe0635
commit 7be9f5a869

View File

@@ -16,6 +16,7 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
if: ${{ secrets.DOCKER_REGISTRY && secrets.DOCKER_USERNAME && secrets.DOCKER_PASSWORD }}
uses: docker/login-action@v3
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
@@ -26,9 +27,9 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
push: true
push: ${{ secrets.DOCKER_REGISTRY != '' }}
tags: |
${{ secrets.DOCKER_REGISTRY }}/calendar:latest
${{ secrets.DOCKER_REGISTRY }}/calendar:${{ github.sha }}
${{ secrets.DOCKER_REGISTRY || 'localhost:5000' }}/runway:latest
${{ secrets.DOCKER_REGISTRY || 'localhost:5000' }}/runway:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max