Download the PHP package piotrpress/github-composer without Composer
On this page you can find all versions of the php package piotrpress/github-composer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download piotrpress/github-composer
More information about piotrpress/github-composer
Files in piotrpress/github-composer
Package github-composer
Short Description This Composer plugin adds support for using GitHub Workflow Artifacts as Composer Repositories.
License MIT
Homepage https://github.com/PiotrPress/github-composer
Informations about the package github-composer
GitHub Composer
This Composer plugin adds support for using GitHub Workflow Artifacts as Composer Repositories.
It also provides GitHub Workflows to build and update the Composer repository based on packages from GitHub repositories.
Example composer.json
Installation
-
Add the plugin as a global composer requirement:
- Allow the plugin execution:
Authentication
Add GitHub API authentication credentials:
NOTE: using --global
option is recommended to keep credentials outside of project's files.
Arguments:
token
- the token must have permissions to get repository content and list artifacts for a repository
Workflows
This plugin also comes with two Reusable Workflows designed to build and update the packages.json artifact based on packages from GitHub repositories belonging to the provided owner.
Build
Add a .github/workflows/build.yml
file with the content below to the GitHub repository where the artifact containing the list of packages should be kept.
NOTE: by using the workflow_dispatch
event, this workflow can also be triggered manually.
Workflow secrets and variables:
secrets.token
- required:false
, the token must have permissions to get repository contentvars.owner
- required:false
, default:github.repository_owner
Update
Add a .github/workflows/update.yml
file with the content below to the GitHub repository, which is configured to trigger an update to the package list after every push.
NOTE: by using the workflow_dispatch
event, this workflow can also be triggered manually.
Workflow secrets and variables:
secrets.token
- required:true
, the token must have permissions to create a repository dispatch eventvars.owner
- required:false
, default:github.repository_owner
vars.repository
- required:true
Requirements
- PHP >=
7.4
version. - Composer ^
2.0
version.
License
MIT
All versions of github-composer with dependencies
composer-plugin-api Version ^2.0
piotrpress/streamer Version ^1.0
guzzlehttp/guzzle Version ^7.0