File tree Expand file tree Collapse file tree 2 files changed +30
-19
lines changed Expand file tree Collapse file tree 2 files changed +30
-19
lines changed Original file line number Diff line number Diff line change 1- name : ' The name of your action here '
2- description : ' Provide a description here '
3- author : ' Your name or organization here '
1+ name : ' Setup Static PHP Action '
2+ description : ' GitHub Actions for setting up a static PHP action '
3+ author : ' crazywhalecc '
44
55# Define your inputs here.
66inputs :
7- milliseconds :
8- description : ' Your input description here'
7+ php-version :
8+ description : ' Setup PHP Version'
9+ required : false
10+ default : ' 8.2'
11+ extensions :
12+ description : ' PHP Extensions'
13+ required : false
14+ default : ' 待确定'
15+ ini-values :
16+ description : ' PHP INI Values'
17+ required : false
18+ default : ' 待确定'
19+ libraries :
20+ description : ' Additional PHP Libraries'
21+ required : false
22+ default : ' 待确定'
23+ enable-zts :
24+ description : ' Enable ZTS'
25+ required : false
26+ default : false
27+ sapi :
28+ description : ' PHP SAPI'
929 required : true
10- default : ' 1000 '
30+ default : ['cli']
1131
1232# Define your outputs here.
1333outputs :
14- time :
34+ sapi :
1535 description : ' Your output description here'
1636
1737runs :
Original file line number Diff line number Diff line change 11const core = require ( '@actions/core' ) ;
2- const { wait } = require ( './wait' ) ;
32
43/**
54 * The main function for the action.
65 * @returns {Promise<void> } Resolves when the action is complete.
76 */
87async function run ( ) {
98 try {
10- const ms = core . getInput ( 'milliseconds ' , { required : true } ) ;
9+ const ms = core . getInput ( 'sapi ' , { required : true } ) ;
1110
12- // Debug logs are only output if the `ACTIONS_STEP_DEBUG` secret is true
13- core . debug ( `Waiting ${ ms } milliseconds ...` ) ;
14-
15- // Log the current timestamp, wait, then log the new timestamp
16- core . debug ( new Date ( ) . toTimeString ( ) ) ;
17- await wait ( parseInt ( ms , 10 ) ) ;
18- core . debug ( new Date ( ) . toTimeString ( ) ) ;
19-
20- // Set outputs for other workflow steps to use
21- core . setOutput ( 'time' , new Date ( ) . toTimeString ( ) ) ;
11+ core . setOutput ( 'sapi' , ms ) ;
12+ core . debug ( `Sapi: ${ ms } ` ) ;
2213 } catch ( error ) {
2314 // Fail the workflow run if an error occurs
2415 core . setFailed ( error . message ) ;
You can’t perform that action at this time.
0 commit comments