File tree Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 1
- name : Create Release
1
+ name : Test and Create Release
2
2
3
3
on :
4
4
push :
5
- tags :
6
- - ' v*'
7
- # Allows you to run this workflow manually from the Actions tab
8
5
workflow_dispatch :
9
6
10
7
env :
11
- DATA_DIR : cypress/yaml
8
+ DATA_DIR : ' cypress/yaml'
12
9
CYPRESS_BASE_URL : " http://localhost:8181"
13
10
14
11
jobs :
25
22
node-version : 23
26
23
- run : npm ci
27
24
- run : npm run build --if-present
25
+ - name : PHP env check
26
+ run : |
27
+ php -r '
28
+ $edd = $_ENV["DATA_DIR"] ?? "--nonexistent--";
29
+ $gdd = getenv("DATA_DIR") ?? "--nonexistent--";
30
+ echo "S_ENV variable DATA_DIR is: " . $edd . "\n";
31
+ echo "getenv variable DATA_DIR is:" . $gdd . "\n";
32
+ '
28
33
- name : Cypress run
29
34
uses : cypress-io/github-action@v6
30
35
with :
Original file line number Diff line number Diff line change 15
15
}
16
16
17
17
// finally merge from environment
18
- if (!empty ($ _ENV ['DATA_DIR ' ])) {
19
- $ settings ['settings ' ]['dataDir ' ] = $ _ENV ['DATA_DIR ' ];
18
+ // dotenv loads .env files and env variables - in that order
19
+ // using getenv() since $_ENV is not available in (at least some) GitHub runners
20
+ if (!empty (getenv ('DATA_DIR ' ))) {
21
+ $ settings ['settings ' ]['dataDir ' ] = getenv ('DATA_DIR ' );
20
22
}
21
23
22
24
$ containerBuilder ->addDefinitions ($ settings );
Original file line number Diff line number Diff line change 18
18
$ containerBuilder ->enableCompilation (ROOT_DIR . 'var/cache ' );
19
19
}
20
20
21
- // Load .env file
22
- $ dotenv = Dotenv \Dotenv::createImmutable (ROOT_DIR );
21
+ // Load .env file and env variables
22
+ // unsafe because we need getenv(), $_ENV is not available in Github runners
23
+ $ dotenv = Dotenv \Dotenv::createUnsafeImmutable (ROOT_DIR );
23
24
$ dotenv ->safeLoad ();
24
25
25
26
// Set up settings
You can’t perform that action at this time.
0 commit comments