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