diff --git a/action.yml b/action.yml index ea7a224..111c9dc 100644 --- a/action.yml +++ b/action.yml @@ -11,6 +11,9 @@ inputs: description: 'The version of PHP to use.' required: false default: '8.3' + composer-token: + description: 'Token for Composer authentication.' + required: false composer-version: description: 'The version of Composer to use.' required: false @@ -44,7 +47,7 @@ runs: using: 'composite' steps: - id: setup-php - name: 'Setup PHP' + name: 'Setup PHP'. uses: shivammathur/setup-php@v2 with: php-version: ${{ inputs.php-version }} @@ -53,7 +56,12 @@ runs: - id: configure-composer name: 'Configure Composer GitHub Token' - run: composer config --global --auth github-oauth.github.com ${{ github.token }} + run: | + if [ -n "${{ inputs.composer-token }}" ]; then + composer config --global --auth github-oauth.github.com ${{ github.token }} + elif + composer config --global --auth github-oauth.github.com ${{ inputs.composer-token }} + fi shell: bash - id: download-satis