Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/rosven9856/composer-package-action
- Owner: rosven9856
- License: mit
- Created: 2024-05-22T16:42:55.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-10-08T16:55:24.000Z (3 months ago)
- Last Synced: 2024-10-14T21:43:01.017Z (3 months ago)
- Topics: composer, gitea, gitea-actions, github-actions
- Language: PHP
- Homepage:
- Size: 206 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```