From 9d08d4247a31f30897171d02752191f639d76590 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sun, 27 Feb 2022 22:29:40 +0100 Subject: [PATCH] CI: Add Composer oauth token for github.com --- .github/actions/install/action.yml | 8 +++++++- .github/workflows/deploy-release.yml | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/actions/install/action.yml b/.github/actions/install/action.yml index 8068e8c..43275f3 100644 --- a/.github/actions/install/action.yml +++ b/.github/actions/install/action.yml @@ -29,7 +29,13 @@ runs: PICO_VERSION="$(php -r 'require("./lib/Pico.php"); echo Pico::VERSION;')" echo "PICO_VERSION=$PICO_VERSION" | tee -a "$GITHUB_ENV" - - name: Setup Composer + - name: Setup Composer auth + shell: bash + working-directory: ${{ inputs.path }} + run: | + composer config --global github-oauth.github.com "${{ github.token }}" + + - name: Setup Composer root version if: ${{ github.ref_type == 'branch' }} shell: bash working-directory: ${{ inputs.path }} diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index a303287..1109cd4 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -204,6 +204,10 @@ jobs: php-version: ${{ env.PHP_VERSION }} tools: composer + - name: Setup Composer auth + run: | + composer config --global github-oauth.github.com "${{ github.token }}" + - name: Get Composer cache directory run: | COMPOSER_CACHE_DIR="$(composer config --global cache-dir)"