File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 1616
1717* ` args ` : Other command line arguments to pass to composer, defaults to ` --optimize-autoloader --no-progress `
1818
19+ * ` github_oauth ` : If your composer needs access to a private repo, configure the github OAuth token to use here.
20+ For example it could come from a secret, i.e. ` secrets.GITHUB_OAUTH ` .
21+
1922Output
2023------
2124* ` composer_cache_dir ` : where the composer cache is located, in case you want to use ` actions/cache `
6366 with :
6467 composer_version : ${{ env.COMPOSER_VERSION }}
6568 command : install
69+ # github_oauth: ${{ secret.GITHUB_OAUTH }}
6670```
6771
6872License
Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ inputs:
1717 required : false
1818 default : " --optimize-autoloader --no-progress"
1919
20+ github_oauth :
21+ description : " OAuth token for accessing github private resources"
22+ required : false
23+ default : " "
24+
2025outputs :
2126 composer_cache_dir :
2227 description : " Where composer created its cache"
3742 COMPOSER_VERSION : ${{ inputs.composer_version }}
3843 COMPOSER_COMMAND : ${{ inputs.command }}
3944 COMPOSER_ARGS : ${{ inputs.args }}
45+ GITHUB_OAUTH : ${{ inputs.github_oauth }}
4046 shell : bash
4147 id : composer_run
4248 run : |
5258 echo "::set-output name=composer_major_version::${DETECTED_MAJOR_VERSION}"
5359 echo "::set-output name=composer_version::${DETECTED_VERSION}"
5460
61+ if [ "$GITHUB_OAUTH" ]; then
62+ docker run --rm --volume ${RUNNER_WORKSPACE}/composer:/tmp \
63+ composer:${COMPOSER_VERSION} config -g github-oauth.github.com $GITHUB_OAUTH
64+ fi
65+
5566 case "${COMPOSER_COMMAND}" in
5667 get_config)
5768 exit
You can’t perform that action at this time.
0 commit comments