Skip to content

Commit e8b962c

Browse files
committed
docs: use pinned hash in all examples
1 parent 822ffe8 commit e8b962c

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

README.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ Use ramsey/composer-install as step within a job. This example also shows use of
3636
the [Setup PHP](https://github.com/shivammathur/setup-php) action as a step.
3737

3838
```yaml
39-
- uses: "shivammathur/setup-php@v2"
39+
- uses: "shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f" # 2.37.0
4040
with:
4141
php-version: "latest"
42-
- uses: "ramsey/composer-install@v3"
42+
- uses: "ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947" # 3.2.0
4343
```
4444
4545
> [!TIP]
@@ -66,7 +66,7 @@ Valid values are:
6666
For example:
6767

6868
```yaml
69-
- uses: "ramsey/composer-install@v3"
69+
- uses: "ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947" # 3.2.0
7070
with:
7171
dependency-versions: "lowest"
7272
```
@@ -80,7 +80,7 @@ options, you may use the `composer-options` input parameter.
8080
For example:
8181

8282
```yaml
83-
- uses: "ramsey/composer-install@v3"
83+
- uses: "ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947" # 3.2.0
8484
with:
8585
composer-options: "--ignore-platform-reqs --optimize-autoloader"
8686
```
@@ -99,7 +99,7 @@ which will use `composer.json` and `composer.lock` as the filenames.
9999
For example:
100100

101101
```yaml
102-
- uses: "ramsey/composer-install@v3"
102+
- uses: "ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947" # 3.2.0
103103
with:
104104
composer-filename: "composer-gh-actions"
105105
```
@@ -112,7 +112,7 @@ located in `packages/acme-foo/`, use `working-directory` to tell
112112
ramsey/composer-install where to run things.
113113

114114
```yaml
115-
- uses: "ramsey/composer-install@v3"
115+
- uses: "ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947" # 3.2.0
116116
with:
117117
working-directory: "packages/acme-foo"
118118
```
@@ -124,15 +124,15 @@ For example:
124124

125125
```yaml
126126
# Install dependencies using composer.json in the root.
127-
- uses: "ramsey/composer-install@v3"
127+
- uses: "ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947" # 3.2.0
128128
129129
# Install dependencies using composer.json in src/Component/Config/
130-
- uses: "ramsey/composer-install@v3"
130+
- uses: "ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947" # 3.2.0
131131
with:
132132
working-directory: "src/Component/Config"
133133
134134
# Install dependencies using composer.json in src/Component/Validator/
135-
- uses: "ramsey/composer-install@v3"
135+
- uses: "ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947" # 3.2.0
136136
with:
137137
working-directory: "src/Component/Validator"
138138
```
@@ -150,7 +150,7 @@ any other value, the action will use the default behavior, which is to read from
150150
and store to the cache.
151151

152152
```yaml
153-
- uses: "ramsey/composer-install@v3"
153+
- uses: "ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947" # 3.2.0
154154
with:
155155
ignore-cache: "yes"
156156
```
@@ -164,7 +164,7 @@ will not use the auto-generated cache key, so if your `composer.json` or
164164
wish to update the cache.
165165

166166
```yaml
167-
- uses: "ramsey/composer-install@v3"
167+
- uses: "ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947" # 3.2.0
168168
with:
169169
custom-cache-key: "my-custom-cache-key"
170170
```
@@ -188,7 +188,7 @@ even more specific, you can specify a suffix to be added to the cache key via th
188188
# Adds a suffix to the cache key which is equivalent to the full date-time
189189
# of "last Monday 00:00", which means that the cache will be force refreshed
190190
# via the first workflow which is run every Monday.
191-
- uses: "ramsey/composer-install@v3"
191+
- uses: "ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947" # 3.2.0
192192
with:
193193
custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F")
194194
```
@@ -222,7 +222,7 @@ job:
222222
repository-projects: read
223223
steps:
224224
# ...
225-
- uses: ramsey/composer-install@v3
225+
- uses: "ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947" # 3.2.0
226226
env:
227227
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
228228
```
@@ -240,7 +240,7 @@ job:
240240
# ...
241241
- run: composer config -- github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
242242
name: Register GitHub token for Composer
243-
- uses: ramsey/composer-install@v3
243+
- uses: "ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947" # 3.2.0
244244
```
245245

246246
Note that this approach is only valid for public forks; if you need to access
@@ -271,10 +271,9 @@ Here's an example of how you might use the `dependency-versions` and
271271
strategy:
272272
matrix:
273273
php:
274-
- "7.4"
275-
- "8.0"
276-
- "8.1"
277-
- "8.2"
274+
- "8.3"
275+
- "8.4"
276+
- "8.5"
278277
dependencies:
279278
- "lowest"
280279
- "highest"
@@ -283,11 +282,11 @@ strategy:
283282
composer-options: "--ignore-platform-reqs"
284283
285284
steps:
286-
- uses: "actions/checkout@v4"
287-
- uses: "shivammathur/setup-php@v2"
285+
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
286+
- uses: "shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f" # 2.37.0
288287
with:
289288
php-version: "${{ matrix.php }}"
290-
- uses: "ramsey/composer-install@v3"
289+
- uses: "ramsey/composer-install@a35c6ebd3d08125aaf8852dff361e686a1a67947" # 3.2.0
291290
with:
292291
dependency-versions: "${{ matrix.dependencies }}"
293292
composer-options: "${{ matrix.composer-options }}"

0 commit comments

Comments
 (0)