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