Files
actual/docker/download-artifacts.sh
Jed Fox c2c8c1719e Authenticate request for artifacts (#204)
Previously, the latest artifact list was requested unauthenticated using
`ADD "https://api.github.com/..." /tmp/artifacts.json`. While this works
locally, on GitHub’s servers it seems that the per-IP rate limit was
exceeded. There isn’t a way to get Docker to pass the `Authorization`
header that I know of, so this work has been moved to an external shell
script that pulls down the relevant data.
2023-05-15 17:47:10 -04:00

15 lines
349 B
Bash
Executable File

#!/bin/bash
URL="https://api.github.com/repos/actualbudget/actual/actions/artifacts?name=actual-web&per_page=100"
if [ -n "$GITHUB_TOKEN" ]; then
curl -L -o artifacts.json --header "Authorization: Bearer ${GITHUB_TOKEN}" $URL
else
curl -L -o artifacts.json $URL
fi
if [ $? -ne 0 ]; then
echo "Failed to download artifacts.json"
exit 1
fi