fix: streamline Docker registry configuration for improved login and metadata extraction
Build and Push Docker Image / build (push) Has been cancelled
Build and Push Docker Image / build (push) Has been cancelled
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -6,8 +6,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY_HOST: gitea.gitea.svc.cluster.local:3000
|
REGISTRY: gitea.gitea.svc.cluster.local
|
||||||
REGISTRY_HTTP: http://gitea.gitea.svc.cluster.local:3000
|
|
||||||
IMAGE_NAME: ${{ gitea.repository }}
|
IMAGE_NAME: ${{ gitea.repository }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -23,22 +22,19 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
|
||||||
buildkitd-config-inline: |
|
|
||||||
[registry."${{ env.REGISTRY_HOST }}"]
|
|
||||||
http = true
|
|
||||||
insecure = true
|
|
||||||
|
|
||||||
- name: Log in to Gitea Container Registry
|
- name: Log in to Gitea Container Registry
|
||||||
shell: bash
|
uses: docker/login-action@v3
|
||||||
run: |
|
with:
|
||||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "${{ env.REGISTRY_HTTP }}" -u "${{ gitea.repository_owner }}" --password-stdin
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ gitea.repository_owner }}
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata
|
- name: Extract metadata
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY_HOST }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
type=sha,prefix=,format=short
|
type=sha,prefix=,format=short
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
|||||||
Reference in New Issue
Block a user