All Projects â†’ ergebnis â†’ composer-normalize-action

ergebnis / composer-normalize-action

Licence: MIT license
+ 🎵 Provides a GitHub action for running ergebnis/composer-normalize.

Programming Languages

Makefile
30231 projects
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to composer-normalize-action

mpv-winbuild
Use Github Action to build mpv for Windows with latest commit.
Stars: ✭ 78 (+212%)
Mutual labels:  github-action
bigflow
A Python framework for data processing on GCP.
Stars: ✭ 96 (+284%)
Mutual labels:  composer
setup-jdk
(DEPRECATED) Set up your GitHub Actions workflow with a specific version of AdoptOpenJDK
Stars: ✭ 32 (+28%)
Mutual labels:  github-action
changed-files
Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.
Stars: ✭ 733 (+2832%)
Mutual labels:  github-action
sql-repository
[PHP 7] SQL Repository implementation
Stars: ✭ 37 (+48%)
Mutual labels:  composer
phpchartjs
A PHP library that makes it easy to generate data for ChartJS.
Stars: ✭ 24 (-4%)
Mutual labels:  composer
github-action-wpe-site-deploy
A GitHub Action to deploy code directly to WP Engine.
Stars: ✭ 116 (+364%)
Mutual labels:  github-action
selene
A opinionated Wordpress base theme based on Sage.
Stars: ✭ 31 (+24%)
Mutual labels:  composer
igni-core
UNSUPPORTED: An easy to use & featherlight CMS that shortcuts the bootstrapping of backend PHP + MySQL based projects. Developed in Laravel, it uses the latest PHP coding standards and library versions.
Stars: ✭ 13 (-48%)
Mutual labels:  composer
org-audit-action
GitHub Action that provides an Organization Membership Audit
Stars: ✭ 34 (+36%)
Mutual labels:  github-action
ticket-check-action
Verify that pull request titles start with a ticket ID
Stars: ✭ 29 (+16%)
Mutual labels:  github-action
wordpress-bundle
Use Wordpress and Symfony together using a Symfony bundle
Stars: ✭ 30 (+20%)
Mutual labels:  composer
session
Aplus Framework Session Library
Stars: ✭ 170 (+580%)
Mutual labels:  composer
find-comment
A GitHub action to find an issue or pull request comment
Stars: ✭ 81 (+224%)
Mutual labels:  github-action
php-abraflexi
PHP Based Library for easy interaction with czech accounting system FlexiBee.
Stars: ✭ 15 (-40%)
Mutual labels:  composer
aws-assume-role
GitHub action to assume subsequent AWS roles
Stars: ✭ 22 (-12%)
Mutual labels:  github-action
yaf-example
A example of yaf
Stars: ✭ 53 (+112%)
Mutual labels:  composer
codeowners-validator
The GitHub CODEOWNERS file validator
Stars: ✭ 142 (+468%)
Mutual labels:  github-action
cygnite-application
Cygnite PHP Framework- Skeleton Application
Stars: ✭ 26 (+4%)
Mutual labels:  composer
action-netlify-deploy
🙌 Netlify deployments via GitHub actions
Stars: ✭ 32 (+28%)
Mutual labels:  github-action

composer-normalize-action

Integrate Deploy

What does this action do?

This action runs ergebnis/composer-normalize.

Usage

Define a workflow in .github/workflows/continuous-integration.yml (or add a job if you already have defined workflows).

💡 Read more about Configuring a workflow.

Default Behaviour

By default this action will run

$ composer normalize

in the working directory.

When you use this action in a step with the default behaviour, the step will fail when

  • composer.json does not exist in this directory (be sure to checkout the code first, see actions/checkout)
  • composer.json is not valid
  • composer.json is valid, but composer.lock is not up-to-date with composer.json

and the step will succeed when

  • composer.json is valid, composer.lock is not present, and composer.json and not yet normalized or could be successfully normalized
  • composer.json is valid, composer.lock is present and up-to-date, and composer.json, and composer.json and not yet normalized or could be successfully normalized

💡 If you want the step to fail when composer.json is not yet normalized, you need to run with the --dry-run options, see below.

Here's an example for a workflow configuration with the default behaviour:

name: "Integrate"

on: "push"

jobs:
  composer-normalize:
    name: "composer-normalize"

    runs-on: "ubuntu-latest"

    steps:
      - name: "Checkout"
        uses: "actions/checkout@v2"

      - name: "Run composer normalize"
        uses: "docker://ergebnis/composer-normalize-action:latest"

Custom Behavior

If you prefer to specify arguments or options yourself, you can configure those using the args option:

 name: "Integrate"

 on: "push"

 jobs:
   composer-normalize:
     name: "composer-normalize"

     runs-on: "ubuntu-latest"

     steps:
       - name: "Checkout"
         uses: "actions/[email protected]"

       - name: "Run composer normalize"
         uses: "docker://ergebnis/composer-normalize-action:latest"
+        with:
+          args: "--diff --dry-run --indent-size=2 --indent-style=space"

Docker image

As Docker images are automatically built and pushed on a merge to main or when a new tag is created in this repository, the recommended way to use this GitHub action is to reference the pre-built Docker image directly, as seen above.

💡 The Docker image can also be executed directly by running

$ docker run --interactive --rm --tty --workdir=/app --volume ${PWD}:/app ergebnis/composer-normalize-action:latest

For more information, see the Docker Docs: Docker run reference.

Instead of using the latest pre-built Docker image, you can also specify a Docker image tag (which corresponds to the tags released on GitHub):

 name: Integrate

 on: push

 jobs:
   composer-normalize:
     name: "composer-normalize"

     runs-on: "ubuntu-latest"

     steps:
       - name: "Checkout"
         uses: "actions/checkout@v2"

       - name: "Run composer normalize"
-        uses: "docker://ergebnis/composer-normalize-action:latest"
+        uses: "docker://ergebnis/composer-normalize-action:0.7.0"

Changelog

Please have a look at CHANGELOG.md.

Contributing

Please have a look at CONTRIBUTING.md.

Code of Conduct

Please have a look at CODE_OF_CONDUCT.md.

License

This package is licensed using the MIT License.

Please have a look at LICENSE.md.

Credits

The implementation of this GitHub action is largely inspired by the work of Oskar Stark on the GitHub actions OskarStark/php-cs-fixer-ga and OskarStark/phpstan-ga.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].