PHPackages                             piotrpress/github-composer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. piotrpress/github-composer

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

piotrpress/github-composer
==========================

This Composer plugin adds support for using GitHub Workflow Artifacts as Composer Repositories.

v2.0.0(2y ago)0123MITPHPPHP &gt;=7.4

Since Feb 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/PiotrPress/github-composer)[ Packagist](https://packagist.org/packages/piotrpress/github-composer)[ Docs](https://github.com/PiotrPress/github-composer)[ RSS](/packages/piotrpress-github-composer/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (4)Used By (0)

GitHub Composer
===============

[](#github-composer)

This Composer plugin adds support for using [GitHub Workflow Artifacts](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts) as [Composer Repositories](https://getcomposer.org/doc/05-repositories.md#composer).

It also provides [GitHub Workflows](https://docs.github.com/en/actions/using-workflows) to build and update the Composer repository based on packages from GitHub repositories.

Example `composer.json`
-----------------------

[](#example-composerjson)

```
{
  "repositories": [
    {
        "type": "composer",
        "url": "github.artifacts://PiotrPress/packages"
    }
  ]
}
```

Installation
------------

[](#installation)

1. Add the plugin as a global composer requirement:

```
$ composer global require piotrpress/github-composer
```

2. Allow the plugin execution:

```
$ composer config -g allow-plugins.piotrpress/github-composer true
```

Authentication
--------------

[](#authentication)

Add GitHub API [authentication](https://getcomposer.org/doc/articles/authentication-for-private-packages.md#http-basic) credentials:

```
$ composer config --global http-basic.github.com x-oauth-basic
```

**NOTE:** using `--global` option is recommended to keep credentials outside of project's files.

Arguments:

- `token` - the [token](https://github.com/settings/tokens) must have permissions to [get repository content](https://docs.github.com/en/rest/repos/contents#get-repository-content) and [list artifacts for a repository](https://docs.github.com/en/rest/actions/artifacts#list-artifacts-for-a-repository)

Workflows
---------

[](#workflows)

This plugin also comes with two [Reusable Workflows](https://docs.github.com/en/actions/using-workflows/reusing-workflows) designed to build and update the packages.json artifact based on packages from GitHub repositories belonging to the provided owner.

### Build

[](#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.

```
name: Build packages.json
on:
  workflow_dispatch:
  repository_dispatch:
    types: [ Update packages.json ]
jobs:
  build:
    uses: piotrpress/github-composer/.github/workflows/build.yml@master
    secrets:
      token: ${{ secrets.token }}
    with:
      owner: ${{ vars.owner }}
```

**NOTE:** by using the `workflow_dispatch` event, this workflow can also be triggered manually.

Workflow [secrets](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) and [variables](https://docs.github.com/en/actions/learn-github-actions/variables):

- `secrets.token` - required: `false`, the [token](https://github.com/settings/tokens) must have permissions to [get repository content](https://docs.github.com/en/rest/repos/contents#get-repository-content)
- `vars.owner` - required: `false`, default: `github.repository_owner`

### Update

[](#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.

```
name: Update packages.json
on:
  workflow_dispatch:
  push:
jobs:
  update:
    uses: piotrpress/github-composer/.github/workflows/update.yml@master
    secrets:
      token: ${{ secrets.token }}
    with:
      owner: ${{ vars.owner }}
      repository: ${{ vars.repository }}
```

**NOTE:** by using the `workflow_dispatch` event, this workflow can also be triggered manually.

Workflow [secrets](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) and [variables](https://docs.github.com/en/actions/learn-github-actions/variables):

- `secrets.token` - required: `true`, the [token](https://github.com/settings/tokens) must have permissions to [create a repository dispatch event](https://docs.github.com/en/rest/repos/repos#create-a-repository-dispatch-event)
- `vars.owner` - required: `false`, default: `github.repository_owner`
- `vars.repository` - required: `true`

Requirements
------------

[](#requirements)

- PHP &gt;= `7.4` version.
- Composer ^`2.0` version.

License
-------

[](#license)

[MIT](license.txt)

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

3

Last Release

864d ago

Major Versions

v1.0.1 → v2.0.02024-02-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10326736?v=4)[Piotr Niewiadomski](/maintainers/PiotrPress)[@PiotrPress](https://github.com/PiotrPress)

---

Top Contributors

[![PiotrPress](https://avatars.githubusercontent.com/u/10326736?v=4)](https://github.com/PiotrPress "PiotrPress (3 commits)")

---

Tags

phpcomposergithubcomposer-pluginactionsworkflowsartifactsartifactgithub.com

### Embed Badge

![Health badge](/badges/piotrpress-github-composer/health.svg)

```
[![Health](https://phpackages.com/badges/piotrpress-github-composer/health.svg)](https://phpackages.com/packages/piotrpress-github-composer)
```

###  Alternatives

[mnsami/composer-custom-directory-installer

A composer plugin, to help install packages of different types in custom paths.

1465.4M62](/packages/mnsami-composer-custom-directory-installer)[liborm85/composer-vendor-cleaner

Composer Vendor Cleaner removes unnecessary development files and directories from vendor directory.

34412.1k1](/packages/liborm85-composer-vendor-cleaner)[oat-sa/tao-core

TAO core extension

66143.7k122](/packages/oat-sa-tao-core)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
