File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 55 types :
66 - created
77
8+ permissions :
9+ contents : write
10+ actions : write
11+
812jobs :
913 handle-slash-command :
1014 runs-on : ubuntu-latest
5458 uses : actions/github-script@v7
5559 with :
5660 script : |
61+ console.log(`GH: ${{ secrets.GITHUB_TOKEN }}`);
5762 const environment = `${{ steps.parse_command.outputs.environment }}`;
5863 console.log(`ENVIRONMENT: ${environment}`);
5964 const project = `${{ steps.parse_command.outputs.project }}`;
@@ -101,7 +106,13 @@ jobs:
101106 const project = `${{ steps.parse_command.outputs.project }}`;
102107 const workflowId = `deploy-${environment}.yml`;
103108
104- console.log(`🚀 Triggering workflow: ${workflowId} for project: ${project}`);
109+ const localRun = `${{ env.ACT }}` === "true";
110+ if (!localRun) {
111+ console.log(`🚀 Triggering workflow: ${workflowId} for project: ${project}`);
112+ } else {
113+ console.log(`Cancelling running a 🚀 workflow from our local env`);
114+ return;
115+ }
105116
106117 github.rest.actions.createWorkflowDispatch({
107118 owner: 'zerodaycode',
You can’t perform that action at this time.
0 commit comments