10000 GitHub - ergebnis/composer-normalize-action at 0.7.0
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 6, 2021. It is now read-only.

ergebnis/composer-normalize-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

composer-normalize-action

Continuous Deployment Continuous Integration

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 --dry-run

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)
  • is not valid
  • is not already normalized

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

name: "Continuous Integration"

on: "push"

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

    runs-on: "ubuntu-latest"

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

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

To see this action in action, take a look at the following checks:

Custom Behavior

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

 name: "Continuous Integration"

 on: "push"

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

     runs-on: "ubuntu-latest"

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

       - name: "Run composer normalize"
         uses: "docker://ergebnis/composer-normalize-action:latest"
+        with:
+          args: "normalize ./sub-directory/composer.json"

Docker image

As Docker images are automatically built and pushed on a merge to master 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: Continuous Integration

 on: push

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

     runs-on: "ubuntu-latest"

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

       - name: "Run composer normalize"
-        uses: "docker://ergebnis/composer-normalize-action:latest"
+        uses: "docker://ergebnis/composer-normalize-action:0.6.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.

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.

About

:octocat: + 🎵 Provides a GitHub action for running ergebnis/composer-normalize.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  
  •  

Packages

No packages published

Contributors 2

  •  
  •  
0