Skip to content

Commit eda7219

Browse files
committed
Revert "More work on actions (#622)"
This reverts commit ebbc8d8.
1 parent fb23490 commit eda7219

File tree

6 files changed

+170
-245
lines changed

6 files changed

+170
-245
lines changed

.github/actions/deploy-to-control-plane/action.yml

+1-10
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ inputs:
1717
description: 'Timeout in seconds for waiting for workloads to be ready'
1818
required: false
1919
default: '900'
20-
cpln_token:
21-
description: 'Control Plane token'
22-
required: true
23-
pr_number:
24-
description: 'Pull Request number'
25-
required: true
2620

2721
outputs:
2822
review_app_url:
@@ -56,14 +50,11 @@ runs:
5650
run: ${{ github.action_path }}/scripts/get-commit-sha.sh
5751
env:
5852
GITHUB_TOKEN: ${{ inputs.github_token }}
59-
PR_NUMBER: ${{ inputs.pr_number }}
53+
PR_NUMBER: ${{ env.PR_NUMBER }}
6054

6155
- name: Deploy to Control Plane
6256
id: deploy
6357
shell: bash
64-
env:
65-
CPLN_TOKEN: ${{ inputs.cpln_token }}
66-
PR_NUMBER: ${{ inputs.pr_number }}
6758
run: |
6859
echo "🚀 Deploying app for PR #${PR_NUMBER}..."
6960

.github/actions/help-command/action.yml

+4-9
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@ inputs:
55
github-token:
66
description: 'GitHub token for posting comments'
77
required: true
8-
issue-number:
9-
description: 'PR/Issue number to post the comment to (optional, defaults to event context)'
10-
required: false
118

129
runs:
1310
using: "composite"
1411
steps:
1512
- name: Show Available Commands
16-
uses: actions/github-script@v7
13+
uses: actions/github-script
1714
with:
1815
github-token: ${{ inputs.github-token }}
1916
script: |
@@ -83,14 +80,12 @@ runs:
8380
'3. Open an issue in this repository',
8481
].join('\n');
8582
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') {
9085
await github.rest.issues.createComment({
9186
owner: context.repo.owner,
9287
repo: context.repo.repo,
93-
issue_number: issueNumber,
88+
issue_number: context.payload.issue.number,
9489
body: helpText
9590
});
9691
} else {

.github/actions/setup-environment/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ runs:
2222
- name: Install Control Plane CLI and cpflow gem
2323
shell: bash
2424
run: |
25-
sudo npm install -g @controlplane/[email protected].1
25+
sudo npm install -g @controlplane/[email protected].0
2626
cpln --version
2727
gem install cpflow -v 4.1.0
2828
cpflow --version

.github/readme.md

-85
This file was deleted.

0 commit comments

Comments
 (0)