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

Fix Label PR check by using python venv for requests library #1973

Merged
Merged
Changes from all commits
Commits
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
13 changes: 11 additions & 2 deletions .github/workflows/label_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@ jobs:
name: Label PR - Community
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Install python requests
run: pip install requests

- name: Create a virtual environment
run: python3 -m venv venv

- name: Activate virtual environment and install dependencies
run: |
source venv/bin/activate
pip3 install requests

- name: Check if user is a member of Ansible org
uses: jannekem/run-python-script-action@v1
id: check_user
Expand All @@ -32,6 +40,7 @@ jobs:
print("User is member")
else:
print("User is community")

- name: Add community label if not a member
if: contains(steps.check_user.outputs.stdout, 'community')
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
Expand Down
Loading