s3 upload improvements

This commit is contained in:
Krivopolenov, Artemiy
2026-01-19 19:39:23 +01:00
parent e6d69f59e8
commit bf2c93a084
2 changed files with 7 additions and 26 deletions

View File

@@ -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"