CI: upload assets with POST (overwrites) and correct content types
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
This commit is contained in:
1 parent
a461fcdcef
commit
90cb768d20
1 file changed
+3
-1
@@ -137,9 +137,11 @@ jobs:
|
|||||||
files="docs/openapi.json docker-compose.yml deploy/prometheus/prometheus.yml deploy/prometheus/alerts.yml
|
files="docs/openapi.json docker-compose.yml deploy/prometheus/prometheus.yml deploy/prometheus/alerts.yml
|
||||||
deploy/grafana/provisioning/datasources/prometheus.yml deploy/grafana/provisioning/dashboards/dashboards.yml
|
deploy/grafana/provisioning/datasources/prometheus.yml deploy/grafana/provisioning/dashboards/dashboards.yml
|
||||||
$(ls deploy/grafana/dashboards/*.json)"
|
$(ls deploy/grafana/dashboards/*.json)"
|
||||||
|
# POST creates or overwrites (ProGet rejects PUT to an existing path).
|
||||||
for dir in $dirs; do
|
for dir in $dirs; do
|
||||||
for file in $files; do
|
for file in $files; do
|
||||||
curl -fsS -X PUT -H "X-ApiKey: $API_KEY" --data-binary "@$file" "$BASE/$dir/$file"
|
case "$file" in *.json) type=application/json ;; *) type=application/yaml ;; esac
|
||||||
|
curl -fsS -X POST -H "X-ApiKey: $API_KEY" -H "Content-Type: $type" --data-binary "@$file" "$BASE/$dir/$file"
|
||||||
echo "uploaded $dir/$file"
|
echo "uploaded $dir/$file"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in new issue
Block a user