Skip to content
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

ci(root): Run CSpell only on community PRs #5633

Merged
merged 8 commits into from
May 27, 2024
21 changes: 20 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
dependency-review:
name: Dependency review
runs-on: ubuntu-latest
environment: Linting
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
Expand All @@ -20,9 +21,27 @@ jobs:
spellcheck:
name: Spell check
runs-on: ubuntu-latest
environment: Linting
steps:
- uses: actions/checkout@v3
- uses: streetsidesoftware/cspell-action@v5
- name: List team members ad check
id: check-user
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
members=$(gh api --paginate "organizations/77433905/team/5565599/members" | jq -r '.[] | .login')
echo "Team members: $members"
if [[ $members == *"$PR_CREATOR"* ]]; then
echo "PR creator is a member of the team."
echo "SKIP_STEP=true" >> $GITHUB_ENV
else
echo "PR creator is not a team member."
echo "SKIP_STEP=false" >> $GITHUB_ENV
fi

- name: Run Spell Check
if: env.SKIP_STEP == 'false'
uses: streetsidesoftware/cspell-action@v5

get-affected:
name: Get Affected Packages
Expand Down
Loading