From ee0db7699c0c7eb094a52e728b453a5161d80e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 14 Oct 2026 18:51:39 +0200 Subject: [PATCH] Upload converted files to the generic package registry Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XqsmB8BBnudp4djsjWpk11 --- .gitea/workflows/convert.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitea/workflows/convert.yaml b/.gitea/workflows/convert.yaml index cd9397c..82d8140 100644 --- a/.gitea/workflows/convert.yaml +++ b/.gitea/workflows/convert.yaml @@ -43,6 +43,20 @@ jobs: gzip -9 *.csv ls -lh *.fr.csv.gz + - name: upload to generic package registry + env: + TOKEN: ${{ secrets.GITEA_TOKEN }} + PACKAGE_URL: ${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/addresses/v1.1.1 + run: | + set -eu + for f in *.fr.csv.gz; do + # gitea refuses to overwrite an existing file (409): delete it first, ignore 404 + status=$(curl --silent --output /dev/null --write-out '%{http_code}' -X DELETE -H "Authorization: token $TOKEN" "$PACKAGE_URL/$f") + echo "DELETE $f: $status" + curl --fail-with-body --silent --show-error -H "Authorization: token $TOKEN" --upload-file "$f" "$PACKAGE_URL/$f" + echo "PUT $f: ok" + done + - name: gitea release if: gitea.ref_type == 'tag' uses: https://github.com/akkuman/gitea-release-action@v1