Skip to content

Commit

Permalink
Revert "CI: workaround regression in speed in shlink short-url list f…
Browse files Browse the repository at this point in the history
…unction"

This reverts commit 6f28606.

No longer necessary with shlink 4.1.0+ and did not work properly regardless.
  • Loading branch information
theofficialgman committed Sep 9, 2024
1 parent d6f17d5 commit b8d9b4b
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/create_shlink_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,14 @@ jobs:
SHLINK_KEY: ${{ secrets.SHLINK_KEY }}
run: |
# get all available URLs
page_number="$(curl -s -X 'GET' --resolve pi-apps-analytics.linkpc.net:443:132.145.164.141 \
'https://pi-apps-analytics.linkpc.net/rest/v2/short-urls?itemsPerPage=10' \
curl -X 'GET' --resolve pi-apps-analytics.linkpc.net:443:132.145.164.141 \
'https://pi-apps-analytics.linkpc.net/rest/v2/short-urls?itemsPerPage=0' \
-H 'accept: application/json' \
-H "X-Api-Key: $SHLINK_KEY" | jq -r '( .shortUrls | .pagination | .pagesCount )')"
for ((i = 1 ; i <= $page_number ; i++ )); do
echo "Obtaining page #$i"
online_shortcodes+="$(curl -s -X 'GET' --resolve pi-apps-analytics.linkpc.net:443:132.145.164.141 \
"https://pi-apps-analytics.linkpc.net/rest/v2/short-urls?itemsPerPage=10&page=$i" \
-H 'accept: application/json' \
-H "X-Api-Key: $SHLINK_KEY" | jq -r '( .shortUrls | .data | .[] | .shortCode )')"
done
-H "X-Api-Key: $SHLINK_KEY"
online_shortcodes="$(curl -s -X 'GET' --resolve pi-apps-analytics.linkpc.net:443:132.145.164.141 \
'https://pi-apps-analytics.linkpc.net/rest/v2/short-urls?itemsPerPage=0' \
-H 'accept: application/json' \
-H "X-Api-Key: $SHLINK_KEY" | jq -r '( .shortUrls | .data | .[] | .shortCode )')"
echo "Online shortcodes: $online_shortcodes"
#create links
applist="$(ls $GITHUB_WORKSPACE/apps | grep .)"
Expand Down

0 comments on commit b8d9b4b

Please sign in to comment.