diff --git a/.gitea/workflows/deploy-ci.yaml b/.gitea/workflows/deploy-ci.yaml index a109a56..75c3d1e 100644 --- a/.gitea/workflows/deploy-ci.yaml +++ b/.gitea/workflows/deploy-ci.yaml @@ -139,17 +139,18 @@ jobs: owner="${repo_full%%/*}" repo="${repo_full##*/}" api="$GITEA_API/repos/$owner/$repo" - echo "🔧 Syncing CI and .gitattributes to: $owner/$repo" + echo "🔧 Syncing .gitattributes and CI to: $owner/$repo" default_branch=$(curl -sSL -H "Authorization: token ${{ secrets.TOKEN }}" "$api" | jq -r '.default_branch') - for file in "$TEMPLATE_PATH" ".gitattributes"; do - if [[ "$file" == "$TEMPLATE_PATH" ]]; then - content="${{ needs.fetch-template.outputs.template_b64 }}" - msg="Update CI from skins-template" - else + # 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" + else + content="${{ needs.fetch-template.outputs.template_b64 }}" + msg="Update CI from skins-template" fi url="$api/contents/$file"