You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Improve composer.lock behavior with ignore-cache (#260)
Fixes a bug where composer.lock is not honored if ignore-cache is set to
`true`. Also, the recently added require-lock-file option had not been
incorporated into tests and documentation, so added a test and docs (and
fixed small typo in CONTRIBUTING)
Fixes#259
Co-authored-by: Ben Ramsey <ben@ramsey.dev>
Copy file name to clipboardexpand all lines: README.md
+13
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,8 @@ For example:
120
120
121
121
#### ignore-cache
122
122
123
+
Normally, ramsey/composer-install preserves composer's cache between jobs
124
+
so that subsequent identically-invoked jobs execute faster.
123
125
If you have jobs for which you wish to completely ignore the caching step, you
124
126
may use the `ignore-cache` input parameter. When present, ramsey/composer-install
125
127
will neither read from nor write to the cache.
@@ -175,6 +177,17 @@ even more specific, you can specify a suffix to be added to the cache key via th
175
177
> [!WARNING]
176
178
> Specifying a `custom-cache-key` will take precedence over the `custom-cache-suffix`.
177
179
180
+
181
+
#### require-lock-file
182
+
183
+
By default, if no composer.lock file is found in the working directory
184
+
ramsey/composer-install will invoke `composer update` regardless of the value of
185
+
`dependency-versions`.
186
+
187
+
If this is set to a value of `true`, ramsey/composer-install will fail in its
188
+
execution if it does not find a lock file.
189
+
190
+
178
191
### Fork and private repositories
179
192
180
193
Sometimes it's needed to use the `repositories` key in your `composer.json` to pull in forks, PRs with patches or private repositories. In this case, your GitHub Action may start failing with a `Could not authenticate against github.com` error message. To solve this, you need to add a GitHub Personal Access token, and this bit to your Action configuration:
0 commit comments