Skip to content

Commit

Permalink
ci: add check for harcoded username in XP Cloud config
Browse files Browse the repository at this point in the history
  • Loading branch information
pozil committed Feb 4, 2025
1 parent 2febec7 commit 644e756
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ jobs:
- name: 'Checkout source code'
uses: actions/checkout@v4

# Check for hardcoded username in XP cloud config
- name: 'Check for hardcoded username in XP cloud config'
run: |
fileToCheck=cc-site/main/default/sites/Coral_Cloud.site-meta.xml
if [ grep siteAdmin $fileToCheck ]; then
echo "Hardcoded siteAdmin detected in $fileToCheck. Remove the tag to fix this.";
exit 1;
fi
if [ grep siteGuestRecordDefaultOwner $fileToCheck ]; then
echo "Hardcoded siteGuestRecordDefaultOwner detected in $fileToCheck. Remove the tag to fix this.";
exit 1;
fi
# Install Volta to enforce proper node and package manager versions
- name: 'Install Volta'
uses: volta-cli/action@v4
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ jobs:
- name: 'Checkout source code'
uses: actions/checkout@v4

# Check for hardcoded users in XP cloud config
- name: 'Check for hardcoded users in XP cloud config'
run: |
fileToCheck=cc-site/main/default/sites/Coral_Cloud.site-meta.xml
if [ grep siteAdmin $fileToCheck ]; then
echo "Hardcoded siteAdmin detected in $fileToCheck. Remove the tag to fix this.";
exit 1;
fi
if [ grep siteGuestRecordDefaultOwner $fileToCheck ]; then
echo "Hardcoded siteGuestRecordDefaultOwner detected in $fileToCheck. Remove the tag to fix this.";
exit 1;
fi
# Install Volta to enforce proper node and package manager versions
- name: 'Install Volta'
uses: volta-cli/action@v4
Expand Down

0 comments on commit 644e756

Please sign in to comment.