Skip to content

Commit 708347f

Browse files
PHP - Add github auth token to composer configuration (#55)
This writes the github auth token to a config file in ~/.composer, which then uses it when downloading packages This will help with github rate limiting, as was happening on #52 Documentation here: https://github.com/shivammathur/setup-php#github-composer-authentication
1 parent 0f61b10 commit 708347f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/test-php.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- main
1111
workflow_call:
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
test-php:
1518
runs-on: ubuntu-latest
@@ -25,6 +28,8 @@ jobs:
2528
uses: shivammathur/setup-php@v2
2629
with:
2730
php-version: "${{ matrix.php }}"
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2833

2934
- name: Discover composer cache directory
3035
id: composer-cache
@@ -55,4 +60,4 @@ jobs:
5560
5661
- name: run acceptance tests
5762
run: make acceptance
58-
working-directory: php
63+
working-directory: php

0 commit comments

Comments
 (0)