Skip to content

Commit

Permalink
Remove "default" github token
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya committed Jan 20, 2021
1 parent 13d7c17 commit fca1f98
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 17 deletions.
5 changes: 0 additions & 5 deletions .docker/.composer-auth.json.example

This file was deleted.

1 change: 0 additions & 1 deletion .docker/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
*
!.composer-auth.json.example
!.gitignore
!.my.cnf.example
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Install Composer dependencies
run: >-
composer config -g github-oauth.github.com 98cbc568911ef1e060a3a31623f2c80c1786d5ff
composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
&& composer install --prefer-dist --no-progress
- name: Install js dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
CACHE_DRIVER: redis
CACHE_DRIVER_LOCAL: array
DB_USERNAME: root
GITHUB_TOKEN: 98cbc568911ef1e060a3a31623f2c80c1786d5ff
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NOTIFICATION_ENDPOINT: ws://127.0.0.1:3000
NOTIFICATION_SERVER_LISTEN_PORT: 3000
OSU_INSTALL_DEV: 1
Expand Down
5 changes: 3 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ else
COMPOSER="composer"
fi

# dummy user, no privilege github token to avoid github api limit
${COMPOSER} config -g github-oauth.github.com 98cbc568911ef1e060a3a31623f2c80c1786d5ff
if [ -n "${GITHUB_TOKEN}" ]; then
${COMPOSER} config -g github-oauth.github.com "${GITHUB_TOKEN}"
fi

rm -f bootstrap/cache/*.php bootstrap/cache/*.json

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ x-env: &x-env
DB_HOST: db
ES_HOST: elasticsearch:9200
ES_SCORES_HOST: elasticsearch:9200
GITHUB_TOKEN: "${GITHUB_TOKEN:-98cbc568911ef1e060a3a31623f2c80c1786d5ff}"
GITHUB_TOKEN: "${GITHUB_TOKEN}"
NOTIFICATION_REDIS_HOST: redis
REDIS_HOST: redis
SESSION_DRIVER: redis
Expand Down
6 changes: 0 additions & 6 deletions docker/development/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ if [ "$genkey" = 1 ]; then
_run artisan key:generate
fi

if [ ! -f .docker/.composer/auth.json ]; then
echo "Copying default composer auth file"
mkdir -p .docker/.composer
cp .docker/.composer-auth.json.example .docker/.composer/auth.json
fi

if [ ! -f .env.testing ]; then
echo "Copying default test env file"
cp .env.testing.example .env.testing
Expand Down

0 comments on commit fca1f98

Please sign in to comment.