Skip to content

Commit

Permalink
[GitHub] Use python venv in Actions (#5066)
Browse files Browse the repository at this point in the history
* [GitHub] Use python venv in Actions

* apply to all GHA

* use the actions/setup-python
  • Loading branch information
hugtalbot authored Oct 16, 2024
1 parent 20eb43e commit 4de128b
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 18 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/post-agenda-sofa-dev-meeting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Install dependencies
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install pip packages
run: |
pip install python-graphql-client
pip install python-dateutil
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/post-announcements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v2
if: ( github.event.discussion.category.name == 'Announcement' ) || ( github.event.discussion.category.name == 'Share your achievements' )

- name: Set up python
uses: actions/setup-python@v5
if: ( github.event.discussion.category.name == 'Announcement' ) || ( github.event.discussion.category.name == 'Share your achievements' )
with:
python-version: '3.12'

- name: Install dependencies
- name: Install pip packages
if: ( github.event.discussion.category.name == 'Announcement' ) || ( github.event.discussion.category.name == 'Share your achievements' )
run: |
pip install python-graphql-client
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/post-github-activity-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Install dependencies
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install pip packages
run: |
pip install python-graphql-client
pip install python-dateutil
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/post-github-activity-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Install dependencies
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install pip packages
run: |
pip install python-graphql-client
pip install python-dateutil
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/post-github-activity-star.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Install dependencies
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install pip packages
run: |
apt install pipx
pipx install python-graphql-client
pipx install python-dateutil
pipx install requests
pip install python-graphql-client
pip install python-dateutil
pip install requests
working-directory: ${{ github.workspace }}

# Star/watch related event
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/post-pending-discussions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.10' # Use the desired Python version
python-version: '3.12'

- name: Install dependencies
- name: Install pip packages
run: |
pip install python-graphql-client
pip install python-dateutil
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Install dependencies
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install pip packages
run: |
pip install python-graphql-client
pip install python-dateutil
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/stale_github_discussions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.10' # Use the desired Python version
python-version: '3.12'

- name: Install dependencies
- name: Install pip packages
run: |
pip install python-graphql-client
pip install python-dateutil
Expand Down

0 comments on commit 4de128b

Please sign in to comment.