Docker workflow fixed #1
@@ -24,44 +24,31 @@ on:
|
||||
|
||||
env:
|
||||
IMAGE_NAME: zola-pwsh-s3
|
||||
# Use the host-accessible URL for registry, not the internal Docker hostname
|
||||
# If your Gitea is only accessible via gitea:3000, you may need to expose it properly
|
||||
REGISTRY: ${{ gitea.server_url }}
|
||||
REGISTRY_HOST: git.dwal.in
|
||||
|
||||
jobs:
|
||||
build-container:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Debug network and DNS
|
||||
run: |
|
||||
echo "=== /etc/hosts contents ==="
|
||||
cat /etc/hosts
|
||||
echo ""
|
||||
echo "=== Trying to curl gitea by hostname ==="
|
||||
curl -v http://gitea:3000 || true
|
||||
echo ""
|
||||
echo "=== Trying to curl gitea by IP ==="
|
||||
curl -v http://172.18.0.6:3000 || true
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
- name: Set up Docker Build
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
registry: ${{ env.REGISTRY_HOST }}
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.GITEA_TOKEN }}
|
||||
password: ${{ secrets.CONTAINER_TOKEN }}
|
||||
|
||||
- name: Extract metadata for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }}
|
||||
images: ${{ env.REGISTRY_HOST }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=sha,prefix=
|
||||
@@ -74,5 +61,5 @@ jobs:
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
cache-from: type=registry,ref=${{ env.REGISTRY_HOST }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }}:buildcache
|
||||
cache-to: type=registry,ref=${{ env.REGISTRY_HOST }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
|
||||
|
||||
Reference in New Issue
Block a user