Skip to content

Commit

Permalink
try passing github token into ruffle update
Browse files Browse the repository at this point in the history
  • Loading branch information
emma-sg committed Dec 23, 2024
1 parent 5d7ed5c commit 88f7a07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/buildapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}

- name: Update Ruffle
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn run update-ruffle

- name: Run Build
Expand Down
6 changes: 5 additions & 1 deletion ruffle/download-latest-ruffle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)

RUFFLE_DIR=$SCRIPT_DIR

SELFHOST_URL=$(curl -s "https://api.github.com/repos/ruffle-rs/ruffle/releases" | jq -r '.[0].assets[] | select(.name | contains("selfhosted")) | .browser_download_url')
if [ -z "$GH_TOKEN" ]; then
SELFHOST_URL=$(curl -s "https://api.github.com/repos/ruffle-rs/ruffle/releases" | jq -r '.[0].assets[] | select(.name | contains("selfhosted")) | .browser_download_url')
else
SELFHOST_URL=$(curl -s --header "Authorization: Bearer $GH_TOKEN" "https://api.github.com/repos/ruffle-rs/ruffle/releases" | jq -r '.[0].assets[] | select(.name | contains("selfhosted")) | .browser_download_url')
fi

echo "$SELFHOST_URL"

Expand Down

0 comments on commit 88f7a07

Please sign in to comment.