diff --git a/.gitea/workflows/deploy-ci.yaml b/.gitea/workflows/deploy-ci.yaml index 765f21b..d79d6a7 100644 --- a/.gitea/workflows/deploy-ci.yaml +++ b/.gitea/workflows/deploy-ci.yaml @@ -135,6 +135,10 @@ jobs: set -eo pipefail mapfile -t repos < "${{ env.REPO_LIST_FILE }}" + # real user (must exist in Gitea) + author_name="Arlind" + author_email="arlind@sulej.ch" + for repo_full in "${repos[@]}"; do owner="${repo_full%%/*}" repo="${repo_full##*/}" @@ -143,8 +147,8 @@ jobs: default_branch=$(curl -sSL -H "Authorization: token ${{ secrets.TOKEN }}" "$api" | jq -r '.default_branch') - # process .gitattributes first, then CI template for file in ".gitattributes" "$TEMPLATE_PATH"; do + if [[ "$file" == ".gitattributes" ]]; then content="${{ needs.fetch-template.outputs.gitattributes_b64 }}" msg="Update .gitattributes from skins-template" @@ -156,10 +160,6 @@ jobs: url="$api/contents/$file" sha=$(curl -sSL -H "Authorization: token ${{ secrets.TOKEN }}" "$url" | jq -r '.sha // empty' || true) - # author + committer used to avoid Gitea default 2001 date - author_name="GitHub Actions" - author_email="actions@github" - if [[ -z "$sha" ]]; then action="Add" payload=$(jq -nc \ @@ -194,7 +194,9 @@ jobs: }') fi - if curl -sSL --fail -X PUT -H "Authorization: token ${{ secrets.TOKEN }}" -H "Content-Type: application/json" \ + if curl -sSL --fail -X PUT \ + -H "Authorization: token ${{ secrets.TOKEN }}" \ + -H "Content-Type: application/json" \ -d "$payload" "$url" >/dev/null; then echo "✅ $action successful for $file in $owner/$repo" else @@ -204,4 +206,4 @@ jobs: done - name: Cleanup - run: rm -f "${{ env.REPO_LIST_FILE }}" \ No newline at end of file + run: rm -f "${{ env.REPO_LIST_FILE }}"