Skip to content

GitHub Action to automatically update package information on Packagist.

License

Notifications You must be signed in to change notification settings

hotaruma/packagist-sync

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Packagist Sync Action

Build and Test License

This action automates the synchronization and updating of package information on Packagist.

Example usage

Minimal setup:

uses: hotaruma/packagist-sync@v1.0.1
with:
  api-token: ${{ secrets.packagist_token }}

  # Optional Parameters
  packagist-username: 'username'
  package-name: 'vendor/package'
  github-repository-url: 'https://github.com/vendor/package'
  packagist-domain: 'https://packagist.org'
  composer-json-path: '/path/to/'

Inputs

api-token

Required - The API token for Packagist.

packagist-username

The username on Packagist.

This parameter is optional if the package name is set in the composer.json file. If the package name is set, the vendor part will be used as the username.

package-name

The name of the package.

This parameter is optional if the package name is already set in the composer.json file.

github-repository-url

The URL of the GitHub repository.

This parameter is optional if the package already exists.

packagist-domain

Optional - The domain of Packagist.

composer-json-path

Optional - The custom path to the composer.json file.

The path should be relative to $GITHUB_WORKSPACE.