Skip to content
This repository has been archived by the owner on Mar 6, 2021. It is now read-only.

Fix: Update README.md and CHANGELOG.md #84

Merged
merged 1 commit into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

For a full diff see [`0.7.0...master`][0.7.0...master].
For a full diff see [`0.8.0...master`][0.8.0...master].

## [`0.8.0`][0.8.0]

For a full diff see [`0.7.0...0.8.0`][0.7.0...0.8.0].

### Changed

* Started building Docker image based on `composer-normalize.phar` ([#81]), by [@localheinz]
* Stopped running with `--dry-run` option by default ([#81]), by [@localheinz]

## [`0.7.0`][0.7.0]

Expand Down Expand Up @@ -165,6 +174,7 @@ For a full diff see [`afa2393...0.1.0`][afa2393...0.1.0].
[0.5.2]: https://github.com/ergebnis/composer-normalize-action/releases/tag/0.5.2
[0.6.0]: https://github.com/ergebnis/composer-normalize-action/releases/tag/0.6.0
[0.7.0]: https://github.com/ergebnis/composer-normalize-action/releases/tag/0.7.0
[0.8.0]: https://github.com/ergebnis/composer-normalize-action/releases/tag/0.8.0

[afa2393...0.1.0]: https://github.com/ergebnis/composer-normalize-action/compare/afa2393...0.1.0
[0.1.0...0.2.0]: https://github.com/ergebnis/composer-normalize-action/compare/0.1.0...0.2.0
Expand All @@ -183,7 +193,8 @@ For a full diff see [`afa2393...0.1.0`][afa2393...0.1.0].
[0.5.1...0.5.2]: https://github.com/ergebnis/composer-normalize-action/compare/0.5.1...0.5.2
[0.5.2...0.6.0]: https://github.com/ergebnis/composer-normalize-action/compare/0.5.2...0.6.0
[0.6.0...0.7.0]: https://github.com/ergebnis/composer-normalize-action/compare/0.6.0...0.7.0
[0.7.0...master]: https://github.com/ergebnis/composer-normalize-action/compare/0.7.0...master
[0.7.0...0.8.0]: https://github.com/ergebnis/composer-normalize-action/compare/0.7.0...0.8.0
[0.8.0...master]: https://github.com/ergebnis/composer-normalize-action/compare/0.8.0...master

[#6]: https://github.com/ergebnis/composer-normalize-action/pull/6
[#7]: https://github.com/ergebnis/composer-normalize-action/pull/7
Expand All @@ -206,6 +217,7 @@ For a full diff see [`afa2393...0.1.0`][afa2393...0.1.0].
[#59]: https://github.com/ergebnis/composer-normalize-action/pull/59
[#63]: https://github.com/ergebnis/composer-normalize-action/pull/63
[#64]: https://github.com/ergebnis/composer-normalize-action/pull/64
[#81]: https://github.com/ergebnis/composer-normalize-action/pull/81

[@localheinz]: https://github.com/localheinz
[@ergebnis]: https://github.com/localheinz
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,28 @@ Define a workflow in `.github/workflows/continuous-integration.yml` (or add a jo
By default this action will run

```
$ composer normalize --dry-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`
When you use this action in a step with the default behaviour, the step will fail when

- does not exist in this directory (be sure to checkout the code first, see [`actions/checkout`](https://github.com/actions/checkout))
- is not valid
- is not already normalized
- `composer.json` does not exist in this directory (be sure to checkout the code first, see [`actions/checkout`](https://github.com/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

:bulb: 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:

```yaml
name: "Continuous Integration"
name: "Integrate"

on: "push"

Expand All @@ -44,7 +51,7 @@ jobs:

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

- name: "Run composer normalize"
uses: "docker://ergebnis/composer-normalize-action:latest"
Expand All @@ -55,7 +62,7 @@ jobs:
If you prefer to specify [arguments](https://github.com/ergebnis/composer-normalize/tree/master#arguments) or [options](https://github.com/ergebnis/composer-normalize/master#options) yourself, you can configure those using the `args` option:

```diff
name: "Continuous Integration"
name: "Integrate"

on: "push"

Expand All @@ -72,7 +79,7 @@ If you prefer to specify [arguments](https://github.com/ergebnis/composer-normal
- name: "Run composer normalize"
uses: "docker://ergebnis/composer-normalize-action:latest"
+ with:
+ args: "./sub-directory/composer.json --diff --indent-size=2 --indent-style=space"
+ args: "--diff --dry-run --indent-size=2 --indent-style=space"
```

### Docker image
Expand All @@ -90,7 +97,7 @@ For more information, see the [Docker Docs: Docker run reference](https://docs.d
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](https://github.com/ergebnis/composer-normalize-action/releases)):

```diff
name: Continuous Integration
name: Integrate

on: push

Expand All @@ -102,7 +109,7 @@ Instead of using the latest pre-built Docker image, you can also specify a Docke

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

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