CI: enforce lowercase image name using toLower(gitea.repository)
Some checks failed
Build and Push Sandbox Base Image / build (push) Failing after 1m43s
Some checks failed
Build and Push Sandbox Base Image / build (push) Failing after 1m43s
This commit is contained in:
@@ -23,10 +23,15 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Set image name (lowercase)
|
||||
id: meta
|
||||
run: |
|
||||
echo "image=${{ secrets.DOCKER_REGISTRY }}/${{ toLower(gitea.repository) }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ secrets.DOCKER_REGISTRY }}
|
||||
registry: ${{ steps.meta.outputs.image }}
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
@@ -37,14 +42,14 @@ jobs:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: |
|
||||
${{ secrets.DOCKER_REGISTRY }}/TheLab/sandbox-base-image:${{ github.sha }}
|
||||
${{ secrets.DOCKER_REGISTRY }}/TheLab/sandbox-base-image:latest
|
||||
cache-from: type=registry,ref=${{ secrets.DOCKER_REGISTRY }}/TheLab/sandbox-base-image:latest
|
||||
cache-to: type=registry,ref=${{ secrets.DOCKER_REGISTRY }}/TheLab/sandbox-base-image:latest,mode=max
|
||||
${{ steps.meta.outputs.image }}:${{ github.sha }}
|
||||
${{ steps.meta.outputs.image }}:latest
|
||||
cache-from: type=registry,ref=${{ steps.meta.outputs.image }}:latest
|
||||
cache-to: type=registry,ref=${{ steps.meta.outputs.image }}:latest,mode=max
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
||||
- name: Tag and push stable (main only)
|
||||
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
|
||||
run: |
|
||||
docker tag ${{ secrets.DOCKER_REGISTRY }}/TheLab/sandbox-base-image:${{ github.sha }} ${{ secrets.DOCKER_REGISTRY }}/TheLab/sandbox-base-image:stable
|
||||
docker push ${{ secrets.DOCKER_REGISTRY }}/TheLab/sandbox-base-image:stable
|
||||
docker tag ${{ steps.meta.outputs.image }}:${{ github.sha }} ${{ steps.meta.outputs.image }}:stable
|
||||
docker push ${{ steps.meta.outputs.image }}:stable
|
||||
|
||||
Reference in New Issue
Block a user