CI: Add Composer oauth token for github.com

This commit is contained in:
Daniel Rudolf 2022-02-27 22:29:40 +01:00
parent 1aacce829f
commit 9d08d4247a
No known key found for this signature in database
GPG key ID: A061F02CD8DE4538
2 changed files with 11 additions and 1 deletions

View file

@ -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 }}

View file

@ -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)"