diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d524cc4fab..04e1910ac9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -339,10 +339,25 @@ jobs: - name: "Install Git and checkout project" uses: actions/checkout@v4.1.7 + - name: Get event type and user to check permissions. + id: get_user + env: + type_event: ${{ github.event.issue.pull_request }} + run: | + if [[ $type_event ]]; then + echo "Event type: $type_event" + echo "event_type=$( echo "$type_event" )" >> $GITHUB_OUTPUT + export user=${{ github.event.pull_request.user.login }} + else + export user=${{ github.actor }} + fi + echo "This PR has been opened by: $user" + echo "user=$( echo "$user" )" >> $GITHUB_OUTPUT + - uses: tspascoal/get-user-teams-membership@v3 id: is_organization_member with: - username: ${{ github.actor }} + username: ${{ steps.get_user.outputs.user }} organization: ansys team: 'pymapdl-developers' GITHUB_TOKEN: ${{ secrets.TOKEN_TEAMS_USER_READ }} diff --git a/doc/changelog.d/3256.added.md b/doc/changelog.d/3256.added.md new file mode 100644 index 0000000000..880acd6a4d --- /dev/null +++ b/doc/changelog.d/3256.added.md @@ -0,0 +1 @@ +ci: run extended array based on the person who open the PR \ No newline at end of file