From 708347fcb675437598d15722e491f008dfed88ef Mon Sep 17 00:00:00 2001 From: Ciaran McNulty Date: Sun, 13 Nov 2022 17:42:51 +0000 Subject: [PATCH] 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 https://github.com/cucumber/gherkin/pull/52 Documentation here: https://github.com/shivammathur/setup-php#github-composer-authentication --- .github/workflows/test-php.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-php.yml b/.github/workflows/test-php.yml index 12e5afb6c..b6daa6997 100644 --- a/.github/workflows/test-php.yml +++ b/.github/workflows/test-php.yml @@ -10,6 +10,9 @@ on: - main workflow_call: +permissions: + contents: read + jobs: test-php: runs-on: ubuntu-latest @@ -25,6 +28,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php }}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Discover composer cache directory id: composer-cache @@ -55,4 +60,4 @@ jobs: - name: run acceptance tests run: make acceptance - working-directory: php \ No newline at end of file + working-directory: php