Skip to content

Commit 8e582c2

Browse files
committed
Add GITHUB_TOKEN to avoid api rate limits
1 parent 8d38785 commit 8e582c2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ runs:
1313
steps:
1414
# Run the action
1515
- name: Setup Flutter Version Management CLI
16-
run: $GITHUB_ACTION_PATH/action.sh ${{ inputs.version }}
1716
shell: bash
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
run: $GITHUB_ACTION_PATH/action.sh ${{ inputs.version }}

hacks/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fi
5757

5858
# Define the URL of the FVM binary
5959
if [[ "$1" == "latest" ]]; then
60-
FVM_VERSION=$(curl -s https://api.github.com/repos/leoafarias/fvm/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
60+
FVM_VERSION=$(curl -s -H "Authorization: bearer $GITHUB_TOKEN" https://api.github.com/repos/leoafarias/fvm/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
6161
if [ -z "$FVM_VERSION" ]; then
6262
error "Failed to fetch latest FVM version."
6363
fi

0 commit comments

Comments
 (0)