Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rosven9856/composer-package-action

Building a composer package in GitHub Action
https://github.com/rosven9856/composer-package-action

composer gitea gitea-actions github-actions

Last synced: about 1 month ago
JSON representation

Building a composer package in GitHub Action

Awesome Lists containing this project

README

        


github gitea actions

# Building a composer package in GitHub Action

[![License](https://img.shields.io/github/license/rosven9856/composer-package-action)](https://github.com/rosven9856/composer-package-action/blob/master/LICENSE)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/rosven9856/composer-package-action/tests.yml)](https://github.com/rosven9856/composer-package-action/actions/workflows/tests.yml)

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

## Example usage

```yaml
steps:
- uses: actions/checkout@v4
- uses: rosven9856/[email protected]
id: composer_package
with:
directory: ''
file: ''
- run: echo ${{ steps.composer_package.outputs.file_path }}
- run: echo ${{ steps.composer_package.outputs.directory_path }}
```

### Inputs

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

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

### Outputs

#### `directory_path`
The path to the building directory

#### `file_path`
The path to the compiled package archive

## Developing

build
```shell
docker build . --build-arg=PHP_VERSION=8.3 -t=composer-package-action
```

initialization
```shell
docker run --rm -v .:/usr/bin/app composer-package-action composer install
```

running
```shell
docker run --rm -v .:/usr/bin/app composer-package-action php app.php
```

testing
```shell
docker run --rm -v .:/usr/bin/app composer-package-action composer tests
```