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
Copy file name to clipboardExpand all lines: README.md
+37-13Lines changed: 37 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
<imgsrc="http://52.48.57.141/php-actions.png"align="right"alt="PHP Actions for Github" />
2
2
3
3
Use the Composer CLI in your Github Actions.
4
-
==============================================
4
+
============================================
5
5
6
6
Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on, and it will manage (install/update) them for you.
7
7
@@ -25,14 +25,14 @@ jobs:
25
25
26
26
steps:
27
27
- uses: actions/checkout@v2
28
-
- uses: php-actions/composer@v2
28
+
- uses: php-actions/composer@v4
29
29
# ... then your own project steps ...
30
30
```
31
31
32
32
Running custom commands
33
33
-----------------------
34
34
35
-
By default, adding `- uses: php-actions/composer@v2` into your workflow will run `composer install`, as `install` is the default command name. The install command will be provided with a default set of arguments (see below).
35
+
By default, adding `- uses: php-actions/composer@v4` into your workflow will run `composer install`, as `install` is the default command name. The install command will be provided with a default set of arguments (see below).
36
36
37
37
You can issue custom commands by passing a `command` input, like so:
38
38
@@ -43,7 +43,7 @@ jobs:
43
43
...
44
44
45
45
- name: Install dependencies
46
-
uses: php-actions/composer@v2
46
+
uses: php-actions/composer@v4
47
47
with:
48
48
command: your-command-here
49
49
```
@@ -72,13 +72,37 @@ jobs:
72
72
...
73
73
74
74
- name: Install dependencies
75
-
uses: php-actions/composer@v2
75
+
uses: php-actions/composer@v4
76
76
with:
77
77
suggest: yes
78
78
dev: no
79
79
args: --profile --ignore-platform-reqs
80
80
```
81
81
82
+
Using different versions of PHP or Composer
83
+
-------------------------------------------
84
+
85
+
This action runs on a custom base image, available at https://github.com/php-actions/php-build which allows for switching the active PHP version on-the-fly, and this repository allows switching of Composer versions on-the-fly.
86
+
87
+
Use the following inputs to run a specific PHP/Composer version combination:
0 commit comments