Skip to content

rosven9856/composer-package-action

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

github gitea actions

Building a composer package in GitHub Action

License

With this GitHub Action, you can build a package for the PHP Composer package manager.

Example usage

    steps:
      - uses: actions/checkout@v4
      - uses: rosven9856/composer-package-action@0.1.0
        id: composer_package
        with:
          BUILD_DIRECTORY_NAME: ''
          BUILD_FILE_NAME: ''
      - run: echo ${{ steps.composer_package.outputs.path }}
      - run: echo ${{ steps.composer_package.outputs.directory }}

Inputs

BUILD_DIRECTORY_NAME

The name of the directory for package building
Default value: .build

BUILD_FILE_NAME

The name of the built package file
Default value: package.zip

Outputs

directory

The path to the building directory

path

The path to the compiled package archive

Developing

build

docker build . --build-arg=PHP_VERSION=8.3.10-1 -t=composer-package-action

initialization

docker run --rm -e GITHUB_WORKSPACE=/usr/bin/app -v .:/usr/bin/app composer-package-action composer install

running

docker run --rm -e GITHUB_WORKSPACE=/usr/bin/app -v .:/usr/bin/app composer-package-action php app.php