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