From e8bb42c1b607d043f3d60da20efa45daa7d2329a Mon Sep 17 00:00:00 2001 From: "Krivopolenov, Artemiy" Date: Mon, 19 Jan 2026 18:45:57 +0100 Subject: [PATCH 1/7] host name and image name fixed --- .gitea/workflows/build-and-deploy.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build-and-deploy.yaml b/.gitea/workflows/build-and-deploy.yaml index cc44887..1dae224 100644 --- a/.gitea/workflows/build-and-deploy.yaml +++ b/.gitea/workflows/build-and-deploy.yaml @@ -27,6 +27,8 @@ on: workflow_dispatch: env: + REGISTRY_HOST: git.dwal.in + IMAGE_NAME: zola-pwsh-s3 TEMPLATES_REPO_URL: ${{ vars.TEMPLATES_REPO_URL }} SCRIPTS_REPO_URL: ${{ vars.SCRIPTS_REPO_URL }} S3_ENDPOINT: ${{ vars.S3_ENDPOINT }} @@ -38,7 +40,7 @@ jobs: # Use custom container with PowerShell, Zola, AWS CLI, Git pre-installed # Built by build-container.yaml workflow from integrations/gitea/Dockerfile container: - image: ${{ gitea.server_url }}/${{ gitea.repository }}/zola-pwsh-s3:latest + image: ${{ env.REGISTRY_HOST }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }}:latest credentials: username: ${{ gitea.actor }} password: ${{ secrets.CONTAINER_TOKEN }} -- 2.49.1 From f5fd35d12ed5181367bb1c835e892e1f113ac574 Mon Sep 17 00:00:00 2001 From: "Krivopolenov, Artemiy" Date: Mon, 19 Jan 2026 18:49:58 +0100 Subject: [PATCH 2/7] Docker update to include nodejs --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 576b3df..819e834 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,18 +15,20 @@ FROM mcr.microsoft.com/powershell:lts-alpine-3.20 # Copy Zola from builder COPY --from=builder /usr/local/bin/zola /usr/local/bin/zola -# Install minimal dependencies: git, aws-cli (for S3), ca-certificates +# Install minimal dependencies: git, aws-cli (for S3), ca-certificates, nodejs (for GitHub Actions) RUN apk add --no-cache \ git \ aws-cli \ ca-certificates \ + nodejs \ && rm -rf /var/cache/apk/* # Verify installations RUN pwsh -Version \ && zola --version \ && aws --version \ - && git --version + && git --version \ + && node --version WORKDIR /workspace -- 2.49.1 From 61f65d6df0166446db30084fddeb3c0040ca862e Mon Sep 17 00:00:00 2001 From: "Krivopolenov, Artemiy" Date: Mon, 19 Jan 2026 18:56:52 +0100 Subject: [PATCH 3/7] container deploy fixed and debug info added --- .gitea/workflows/build-and-deploy.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.gitea/workflows/build-and-deploy.yaml b/.gitea/workflows/build-and-deploy.yaml index 1dae224..fba1ded 100644 --- a/.gitea/workflows/build-and-deploy.yaml +++ b/.gitea/workflows/build-and-deploy.yaml @@ -44,8 +44,27 @@ jobs: credentials: username: ${{ gitea.actor }} password: ${{ secrets.CONTAINER_TOKEN }} + options: --pull always steps: + - name: Debug container environment + run: | + echo "=== Container Debug Info ===" + echo "Image being used: ${{ env.REGISTRY_HOST }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }}:latest" + echo "Current user: $(whoami)" + echo "PATH: $PATH" + echo "" + echo "=== Installed tools ===" + pwsh -Version || echo "PowerShell not found!" + zola --version || echo "Zola not found!" + git --version || echo "Git not found!" + aws --version || echo "AWS CLI not found!" + node --version || echo "Node.js not found!" + which node || echo "Node executable not in PATH" + echo "" + echo "=== Alpine packages with 'node' ===" + apk info | grep node || echo "No node packages found" + - name: Checkout metadata repository uses: actions/checkout@v4 with: -- 2.49.1 From 038c42dff733873d8971437f1b3fa314d42b4e5f Mon Sep 17 00:00:00 2001 From: "Krivopolenov, Artemiy" Date: Mon, 19 Jan 2026 19:01:21 +0100 Subject: [PATCH 4/7] removed incorrect flag --- .gitea/workflows/build-and-deploy.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/build-and-deploy.yaml b/.gitea/workflows/build-and-deploy.yaml index fba1ded..ac90af7 100644 --- a/.gitea/workflows/build-and-deploy.yaml +++ b/.gitea/workflows/build-and-deploy.yaml @@ -44,7 +44,6 @@ jobs: credentials: username: ${{ gitea.actor }} password: ${{ secrets.CONTAINER_TOKEN }} - options: --pull always steps: - name: Debug container environment -- 2.49.1 From e6d69f59e816dcb80eb52889694da60e2e29efd0 Mon Sep 17 00:00:00 2001 From: "Krivopolenov, Artemiy" Date: Mon, 19 Jan 2026 19:21:25 +0100 Subject: [PATCH 5/7] sha as tag --- .gitea/workflows/build-and-deploy.yaml | 5 ++++- .gitea/workflows/build-container.yaml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build-and-deploy.yaml b/.gitea/workflows/build-and-deploy.yaml index ac90af7..e1d2dbd 100644 --- a/.gitea/workflows/build-and-deploy.yaml +++ b/.gitea/workflows/build-and-deploy.yaml @@ -29,6 +29,7 @@ on: env: REGISTRY_HOST: git.dwal.in IMAGE_NAME: zola-pwsh-s3 + IMAGE_TAG: v2 # Increment this when you rebuild the container to bypass cache TEMPLATES_REPO_URL: ${{ vars.TEMPLATES_REPO_URL }} SCRIPTS_REPO_URL: ${{ vars.SCRIPTS_REPO_URL }} S3_ENDPOINT: ${{ vars.S3_ENDPOINT }} @@ -40,7 +41,9 @@ jobs: # Use custom container with PowerShell, Zola, AWS CLI, Git pre-installed # Built by build-container.yaml workflow from integrations/gitea/Dockerfile container: - image: ${{ env.REGISTRY_HOST }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }}:latest + # Using version tag to bypass cache issues + # Increment IMAGE_TAG in env when rebuilding container + image: ${{ env.REGISTRY_HOST }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} credentials: username: ${{ gitea.actor }} password: ${{ secrets.CONTAINER_TOKEN }} diff --git a/.gitea/workflows/build-container.yaml b/.gitea/workflows/build-container.yaml index 137f1fa..9ba747a 100644 --- a/.gitea/workflows/build-container.yaml +++ b/.gitea/workflows/build-container.yaml @@ -24,6 +24,7 @@ on: env: IMAGE_NAME: zola-pwsh-s3 + IMAGE_TAG: v2 # Increment this to force new image builds REGISTRY_HOST: git.dwal.in jobs: @@ -51,6 +52,7 @@ jobs: images: ${{ env.REGISTRY_HOST }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }} tags: | type=raw,value=latest + type=raw,value=${{ env.IMAGE_TAG }} type=sha,prefix= - name: Build and push container image -- 2.49.1 From bf2c93a08444f68d3bdf6b374796f2ae2a795be8 Mon Sep 17 00:00:00 2001 From: "Krivopolenov, Artemiy" Date: Mon, 19 Jan 2026 19:39:23 +0100 Subject: [PATCH 6/7] s3 upload improvements --- .gitea/workflows/build-and-deploy.yaml | 31 ++++++-------------------- .gitea/workflows/build-container.yaml | 2 -- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/.gitea/workflows/build-and-deploy.yaml b/.gitea/workflows/build-and-deploy.yaml index e1d2dbd..22f0798 100644 --- a/.gitea/workflows/build-and-deploy.yaml +++ b/.gitea/workflows/build-and-deploy.yaml @@ -29,7 +29,6 @@ on: env: REGISTRY_HOST: git.dwal.in IMAGE_NAME: zola-pwsh-s3 - IMAGE_TAG: v2 # Increment this when you rebuild the container to bypass cache TEMPLATES_REPO_URL: ${{ vars.TEMPLATES_REPO_URL }} SCRIPTS_REPO_URL: ${{ vars.SCRIPTS_REPO_URL }} S3_ENDPOINT: ${{ vars.S3_ENDPOINT }} @@ -41,32 +40,12 @@ jobs: # Use custom container with PowerShell, Zola, AWS CLI, Git pre-installed # Built by build-container.yaml workflow from integrations/gitea/Dockerfile container: - # Using version tag to bypass cache issues - # Increment IMAGE_TAG in env when rebuilding container - image: ${{ env.REGISTRY_HOST }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} + image: ${{ env.REGISTRY_HOST }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }}:latest credentials: username: ${{ gitea.actor }} password: ${{ secrets.CONTAINER_TOKEN }} steps: - - name: Debug container environment - run: | - echo "=== Container Debug Info ===" - echo "Image being used: ${{ env.REGISTRY_HOST }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }}:latest" - echo "Current user: $(whoami)" - echo "PATH: $PATH" - echo "" - echo "=== Installed tools ===" - pwsh -Version || echo "PowerShell not found!" - zola --version || echo "Zola not found!" - git --version || echo "Git not found!" - aws --version || echo "AWS CLI not found!" - node --version || echo "Node.js not found!" - which node || echo "Node executable not in PATH" - echo "" - echo "=== Alpine packages with 'node' ===" - apk info | grep node || echo "No node packages found" - - name: Checkout metadata repository uses: actions/checkout@v4 with: @@ -108,13 +87,17 @@ jobs: [default] region = garage output = json + s3 = + max_concurrent_requests = 20 + max_queue_size = 10000 EOF - name: Upload to S3 (Garage) run: | - echo "Uploading to s3://$S3_BUCKET" + echo "Uploading to s3://$S3_BUCKET with parallel transfers" aws s3 sync ./template/public/ "s3://$S3_BUCKET/" \ --endpoint-url "https://$S3_ENDPOINT" \ --acl public-read \ - --delete + --delete \ + --quiet echo "Upload complete" diff --git a/.gitea/workflows/build-container.yaml b/.gitea/workflows/build-container.yaml index 9ba747a..137f1fa 100644 --- a/.gitea/workflows/build-container.yaml +++ b/.gitea/workflows/build-container.yaml @@ -24,7 +24,6 @@ on: env: IMAGE_NAME: zola-pwsh-s3 - IMAGE_TAG: v2 # Increment this to force new image builds REGISTRY_HOST: git.dwal.in jobs: @@ -52,7 +51,6 @@ jobs: images: ${{ env.REGISTRY_HOST }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }} tags: | type=raw,value=latest - type=raw,value=${{ env.IMAGE_TAG }} type=sha,prefix= - name: Build and push container image -- 2.49.1 From 246e9c2667f883f4a0eb60d2eef1a97c4509589e Mon Sep 17 00:00:00 2001 From: "Krivopolenov, Artemiy" Date: Mon, 19 Jan 2026 19:56:16 +0100 Subject: [PATCH 7/7] S3 upload issue fixed --- .gitea/workflows/build-and-deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/build-and-deploy.yaml b/.gitea/workflows/build-and-deploy.yaml index 22f0798..711f828 100644 --- a/.gitea/workflows/build-and-deploy.yaml +++ b/.gitea/workflows/build-and-deploy.yaml @@ -98,6 +98,7 @@ jobs: aws s3 sync ./template/public/ "s3://$S3_BUCKET/" \ --endpoint-url "https://$S3_ENDPOINT" \ --acl public-read \ + --exclude "media/*" \ --delete \ --quiet echo "Upload complete" -- 2.49.1