Skip to content

Commit 6a9999c

Browse files
committed
fix: wrong workflow abort logic
1 parent 4ce4a5a commit 6a9999c

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: '3.8'
2+
3+
services:
4+
postgres:
5+
image: postgres:17
6+
container_name: postgres
7+
restart: always
8+
environment:
9+
POSTGRES_USER: yourusername # Replace with your desired username
10+
POSTGRES_PASSWORD: yourpassword # Replace with your desired password
11+
POSTGRES_DB: yourdatabase # Replace with your desired database name
12+
ports:
13+
- "5432:5432" # Maps port 5432 on the host to port 5432 in the container
14+
volumes:
15+
- postgres_data:/var/lib/postgresql/data # Persistent data storage
16+
17+
volumes:
18+
postgres_data:
19+
driver: local

actions_scripts/parse_deployment_command.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @param {Object} options.core module for interacting with GitHub Actions workflow commands and outputs.
66
*/
77
export default ({context, core}) => {
8-
const localRun = !context.payload.act;
8+
const localRun = context.payload.act;
99
let commentBody = context.payload.comment?.body || '';
1010

1111
if (localRun)
@@ -22,16 +22,16 @@ export default ({context, core}) => {
2222
if (environmentMatch) {
2323
environment = environmentMatch[1];
2424
console.log(`Environment: ${environment}`);
25+
} else {
26+
core.setFailed("No environment specified. Aborting workflow.");
27+
return;
2528
}
2629

2730
// Parse project
2831
const projectMatch = commentBody.match(/--project\s+([a-zA-Z0-9_-]+)/);
2932
if (projectMatch) {
3033
project = projectMatch[1];
3134
console.log(`Project: ${project}`);
32-
} else {
33-
core.setFailed("No project specified. Aborting workflow.");
34-
return;
3535
}
3636

3737
// Parse infra

0 commit comments

Comments
 (0)