Compare commits
2
Commits
51df67442a
...
ee0db7699c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee0db7699c
|
||
|
|
17cbbb8145
|
@@ -16,7 +16,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
convert:
|
convert:
|
||||||
runs-on: ubuntu-latest
|
runs-on: cth-ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -43,6 +43,20 @@ jobs:
|
|||||||
gzip -9 *.csv
|
gzip -9 *.csv
|
||||||
ls -lh *.fr.csv.gz
|
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
|
- name: gitea release
|
||||||
if: gitea.ref_type == 'tag'
|
if: gitea.ref_type == 'tag'
|
||||||
uses: https://github.com/akkuman/gitea-release-action@v1
|
uses: https://github.com/akkuman/gitea-release-action@v1
|
||||||
|
|||||||
Reference in new issue
Block a user