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

Fix: Use environment variable directly and require localheinz/composer-normalize in entrypoint.sh #36

Merged
merged 1 commit into from
Aug 22, 2019
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

For a full diff see [`0.4.1...master`](https://github.com/localheinz/composer-normalize-action/compare/0.4.1...master).

## [`0.4.1`](https://github.com/localheinz/composer-normalize-action/releases/tag/0.4.1)

For a full diff see [`0.4.0...0.4.1`](https://github.com/localheinz/composer-normalize-action/compare/0.4.0...0.4.1).

### Fixed

* Use environment variable `COMPOSER_NORMALIZE_VERSION` directly instead of input parameter `composer-normalize-version` and require corresponding version of `localheinz/composer-normalize` in `entrypoint.sh` ([#35](https://github.com/localheinz/composer-normalize-action/pull/35)), by [@localheinz](https://github.com/localheinz)

For a full diff see [`0.4.0...master`](https://github.com/localheinz/composer-normalize-action/compare/0.4.0...master).

## [`0.4.0`](https://github.com/localheinz/composer-normalize-action/releases/tag/0.4.0)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ jobs:
uses: docker://localheinz/composer-normalize-action:x.y.z
```

### Inputs
### Environment Variables

If you wish to specify the version of [`localheinz/composer-normalize`](https://github.com/localheinz/composer-normalize) that should be used by the action, you can use the `composer-normalize-version` input parameter:
If you wish to specify the version of [`localheinz/composer-normalize`](https://github.com/localheinz/composer-normalize) that should be used by the action, you can use the `COMPOSER_NORMALIZE_VERSION` environment variable:

```yaml
name: CI
Expand All @@ -61,8 +61,8 @@ jobs:
- uses: actions/checkout@master
- name: Run localheinz/composer-normalize
uses: docker://localheinz/composer-normalize-action
with:
composer-normalize-version: '^1.3.0'
env:
COMPOSER_NORMALIZE_VERSION: '^1.3.0'
```

The value can be a range (for example, `^1.3.0`) or an exact version (for example, `1.2.0`).
Expand Down
1 change: 1 addition & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh -l

sh -c "composer global require localheinz/composer-normalize:$COMPOSER_NORMALIZE_VERSION"
sh -c "if [[ '$HOME' != '/root' ]]; then cp -r /root/.composer $HOME/.composer; fi"
sh -c "composer normalize --dry-run"