File tree Expand file tree Collapse file tree 6 files changed +170
-245
lines changed Expand file tree Collapse file tree 6 files changed +170
-245
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,6 @@ inputs:
17
17
description : ' Timeout in seconds for waiting for workloads to be ready'
18
18
required : false
19
19
default : ' 900'
20
- cpln_token :
21
- description : ' Control Plane token'
22
- required : true
23
- pr_number :
24
- description : ' Pull Request number'
25
- required : true
26
20
27
21
outputs :
28
22
review_app_url :
@@ -56,14 +50,11 @@ runs:
56
50
run : ${{ github.action_path }}/scripts/get-commit-sha.sh
57
51
env :
58
52
GITHUB_TOKEN : ${{ inputs.github_token }}
59
- PR_NUMBER : ${{ inputs.pr_number }}
53
+ PR_NUMBER : ${{ env.PR_NUMBER }}
60
54
61
55
- name : Deploy to Control Plane
62
56
id : deploy
63
57
shell : bash
64
- env :
65
- CPLN_TOKEN : ${{ inputs.cpln_token }}
66
- PR_NUMBER : ${{ inputs.pr_number }}
67
58
run : |
68
59
echo "🚀 Deploying app for PR #${PR_NUMBER}..."
69
60
Original file line number Diff line number Diff line change @@ -5,15 +5,12 @@ inputs:
5
5
github-token :
6
6
description : ' GitHub token for posting comments'
7
7
required : true
8
- issue-number :
9
- description : ' PR/Issue number to post the comment to (optional, defaults to event context)'
10
- required : false
11
8
12
9
runs :
13
10
using : " composite"
14
11
steps :
15
12
- name : Show Available Commands
16
- uses : actions/github-script@v7
13
+ uses : actions/github-script
17
14
with :
18
15
github-token : ${{ inputs.github-token }}
19
16
script : |
@@ -83,14 +80,12 @@ runs:
83
80
'3. Open an issue in this repository',
84
81
].join('\n');
85
82
86
- const issueNumber = inputs['issue-number'] ||
87
- (context.eventName === 'issue_comment' ? context.payload.issue.number : null);
88
-
89
- if (issueNumber) {
83
+ const context = github.context;
84
+ if (context.eventName === 'issue_comment') {
90
85
await github.rest.issues.createComment({
91
86
owner: context.repo.owner,
92
87
repo: context.repo.repo,
93
- issue_number: issueNumber ,
88
+ issue_number: context.payload.issue.number ,
94
89
body: helpText
95
90
});
96
91
} else {
Original file line number Diff line number Diff line change 22
22
- name : Install Control Plane CLI and cpflow gem
23
23
shell : bash
24
24
run : |
25
- sudo npm install -g @controlplane/cli@3.3.1
25
+ sudo npm install -g @controlplane/cli@3.3.0
26
26
cpln --version
27
27
gem install cpflow -v 4.1.0
28
28
cpflow --version
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments