From 85eab43131eee704991a66dd9accd64e252e8968 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Fri, 17 Sep 2021 09:17:38 +0200 Subject: [PATCH] Fix composer Could not authenticate against github.com on CI See: * https://github.com/shivammathur/setup-php#composer-github-oauth * https://docs.github.com/en/actions/reference/authentication-in-a-workflow --- .github/workflows/ci.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 19f5fff..67ed1fd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,6 +25,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: PHP lint run: "find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l" @@ -49,6 +51,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get Composer Cache Directory id: composer-cache @@ -92,6 +96,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get Composer Cache Directory id: composer-cache @@ -128,6 +134,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "7.4" + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Install xmllint run: sudo apt-get install libxml2-utils @@ -165,6 +173,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "7.4" + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get Composer Cache Directory id: composer-cache @@ -203,6 +213,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get Composer Cache Directory id: composer-cache @@ -244,6 +256,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get Composer Cache Directory id: composer-cache @@ -288,6 +302,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get Composer Cache Directory id: composer-cache @@ -343,6 +359,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get Composer Cache Directory id: composer-cache @@ -399,6 +417,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get Composer Cache Directory id: composer-cache @@ -452,6 +472,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get Composer Cache Directory id: composer-cache @@ -492,6 +514,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get Composer Cache Directory id: composer-cache