Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix Github Action / Control Plane Pipeline #626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Judahmeek merged 19 commits into master from judahmeek/secrets
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
8f7c638
initial attempt
Judahmeek Mar 13, 2025
1454772
composite actions cant use secrets
Judahmeek Mar 13, 2025
d70b546
try again
Judahmeek Mar 14, 2025
0562a28
try adding quotes
Judahmeek Mar 14, 2025
d17ca4e
fix references to output from other jobs
Judahmeek Mar 17, 2025
1039020
add debug steps
Judahmeek Mar 17, 2025
a6fe0a3
debug
Judahmeek Mar 17, 2025
ee5c4f4
fix deploy job's dependencies
Judahmeek Mar 17, 2025
c334031
attempt
Judahmeek Mar 18, 2025
5f30098
add debug statement
Judahmeek Mar 18, 2025
328f25f
attempt
Judahmeek Mar 18, 2025
dfc82c4
revert changes to deploy script
Judahmeek Mar 18, 2025
d63cfb9
check-workflows
Judahmeek Mar 19, 2025
95415c1
ditch-bash
Judahmeek Mar 19, 2025
1442b41
tee
Judahmeek Mar 19, 2025
62c6465
condense
Judahmeek Mar 19, 2025
fd00379
workload
Judahmeek Mar 19, 2025
6f4ef1e
braces to parentheses
Judahmeek Mar 19, 2025
99a6c33
quotes
Judahmeek Mar 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/actions/deploy-to-control-plane/action.yml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,10 @@ inputs:
org:
description: 'Organization name'
required: true
github_token:
description: 'GitHub token'
required: true
wait_timeout:
description: 'Timeout in seconds for waiting for workloads to be ready'
required: false
default: '900'
cpln_token:
description: 'Control Plane token'
required: true
pr_number:
description: 'Pull Request number'
required: true
Expand All @@ -38,7 +32,6 @@ runs:
env:
APP_NAME: ${{ inputs.app_name }}
CPLN_ORG: ${{ inputs.org }}
CPLN_TOKEN: ${{ inputs.cpln_token }}
WAIT_TIMEOUT: ${{ inputs.wait_timeout }}
run: |
# Run the deployment script
Expand Down
28 changes: 0 additions & 28 deletions .github/actions/validate-required-vars/action.yml
View file Open in desktop

This file was deleted.

24 changes: 23 additions & 1 deletion .github/workflows/delete-review-app.yml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ permissions:
issues: write

env:
PREFIX: ${{ vars.REVIEW_APP_PREFIX }}
CPLN_ORG: ${{ vars.CPLN_ORG_STAGING }}
CPLN_TOKEN: ${{ secrets.CPLN_TOKEN_STAGING }}
APP_NAME: ${{ vars.REVIEW_APP_PREFIX }}-pr-${{ github.event.pull_request.number || github.event.issue.number || inputs.pr_number }}
Expand All @@ -43,7 +44,28 @@ jobs:
- uses: actions/checkout@v4

- name: Validate Required Secrets and Variables
uses: ./.github/actions/validate-required-vars
shell: bash
run: |
missing=()

# Check required secrets
if [ -z "$CPLN_TOKEN" ]; then
missing+=("Secret: CPLN_TOKEN_STAGING")
fi

# Check required variables
if [ -z "$CPLN_ORG" ]; then
missing+=("Variable: CPLN_ORG_STAGING")
fi

if [ -z "$"PREFIX" }} ]; then
missing+=("Variable: REVIEW_APP_PREFIX")
fi

if [ ${#missing[@]} -ne 0 ]; then
echo "Required secrets/variables are not set: ${missing[*]}"
exit 1
fi

Comment on lines 46 to 69
Copy link

@coderabbitai coderabbitai bot Mar 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Validation Script: Critical Syntax Issue in Variable Check.
In the validation step (line 61), the condition

if [ -z "$"PREFIX" }} ]; then

is syntactically incorrect. Please change it to:

if [ -z "$PREFIX" ]; then

to correctly validate if PREFIX is set.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 50-50: trailing spaces

(trailing-spaces)


[error] 55-55: trailing spaces

(trailing-spaces)


[error] 64-64: trailing spaces

(trailing-spaces)


[error] 68-68: trailing spaces

(trailing-spaces)

- name: Setup Environment
uses: ./.github/actions/setup-environment
Expand Down
36 changes: 28 additions & 8 deletions .github/workflows/deploy-to-control-plane-review-app.yml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ name: Deploy PR Review App to Control Plane

run-name: Deploy PR Review App - PR #${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }}


on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- '**' # Any branch
- '!main' # Except main
- '!master' # Except master
branches: [ "master" ]
pull_request:
branches: [ "master" ]
issue_comment:
types: [created]
workflow_dispatch:
Expand All @@ -24,6 +22,7 @@ concurrency:
cancel-in-progress: true

env:
PREFIX: ${{ vars.REVIEW_APP_PREFIX }}
APP_NAME: ${{ vars.REVIEW_APP_PREFIX }}-pr-${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }}
CPLN_TOKEN: ${{ secrets.CPLN_TOKEN_STAGING }}
CPLN_ORG: ${{ vars.CPLN_ORG_STAGING }}
Expand Down Expand Up @@ -70,7 +69,28 @@ jobs:
fetch-depth: 0

- name: Validate Required Secrets and Variables
uses: ./.github/actions/validate-required-vars
shell: bash
run: |
missing=()

# Check required secrets
if [ -z "$CPLN_TOKEN" ]; then
missing+=("Secret: CPLN_TOKEN_STAGING")
fi

# Check required variables
if [ -z "$CPLN_ORG" ]; then
missing+=("Variable: CPLN_ORG_STAGING")
fi

if [ -z "$PREFIX" ]; then
missing+=("Variable: REVIEW_APP_PREFIX")
fi

if [ ${#missing[@]} -ne 0 ]; then
echo "Required secrets/variables are not set: ${missing[*]}"
exit 1
fi

- name: Get PR HEAD Ref
id: getRef
Expand Down Expand Up @@ -368,7 +388,7 @@ jobs:
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: ${{ steps.create-comment.outputs.comment-id }},
comment_id: '${{ steps.create-comment.outputs.comment-id }}',
body: deployingMessage
});

Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /