Skip to content

Commit

Permalink
Merge pull request #23766 from redpanda-data/backport-v24-1-x/fix-pyt…
Browse files Browse the repository at this point in the history
…hon-action

[v24.1.x] gha: fix pip install on python actions
  • Loading branch information
clee authored Oct 14, 2024
2 parents a0babdb + 269927d commit 488947b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/jira_issue_manage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ jobs:
- name: install dependencies
env:
SCRIPT_DIR: ${{ github.workspace }}/.github/workflows/scripts
run: pip install -r ${SCRIPT_DIR}/requirements.txt
run: |
python3 -mvenv /tmp/venv/jira
source /tmp/venv/jira/bin/activate
pip install -r ${SCRIPT_DIR}/requirements.txt
- name: install pandoc
run: sudo apt-get update && sudo apt-get install -y pandoc
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -48,4 +53,4 @@ jobs:
ISSUE_LABELS: ${{ join(github.event.issue.labels.*.name) }}
ISSUE_STATE: ${{ github.event.issue.state }}
EVENT_NAME: ${{ github.event.action }}
run: python ${SCRIPT_DIR}/jira_helper.py ISSUE --verbose
run: /tmp/venv/jira/bin/python ${SCRIPT_DIR}/jira_helper.py ISSUE --verbose
7 changes: 5 additions & 2 deletions .github/workflows/lint-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ jobs:
uses: actions/checkout@v4

- name: Install yapf
run: pip install yapf==0.40.1
run: |
python3 -mvenv /tmp/venv/yapf
source /tmp/venv/yapf/bin/activate
pip install yapf==0.40.1
- name: Run yapf
run: find . -type f -name '*.py' | xargs -n8 yapf -d
run: find . -type f -name '*.py' | xargs -n8 /tmp/venv/yapf/bin/yapf -d
6 changes: 5 additions & 1 deletion .github/workflows/render-pr-body-release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ jobs:
with:
python-version: '3.10'
cache: 'pip'
- run: pip3 install -r ./rpchangelog/requirements.txt
- run: |
python3 -mvenv /tmp/venv/rpcl
source /tmp/venv/rpcl/bin/activate
pip3 install -r ./rpchangelog/requirements.txt
- name: Render PR body release notes to job summary
env:
PR_NUM: ${{ github.event.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
source /tmp/venv/rpcl/bin/activate
./rpchangelog/rpchangelog.py --log-level=DEBUG --github-owner="$GITHUB_REPOSITORY_OWNER" pr "$PR_NUM" >> "$GITHUB_STEP_SUMMARY"
LINK_TO_SUMMARY="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
FINAL_MSG="View rendered release notes of PR #$PR_NUM in the job summary: $LINK_TO_SUMMARY"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/transform-sdk-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ jobs:
- name: Publish
working-directory: src/transform-sdk/rust
run: |
python3 -m venv /tmp/venv/publish
source /tmp/venv/publish/bin/activate
pip install tomlkit
./scripts/publish.py --version ${{github.ref_name}}
env:
Expand Down

0 comments on commit 488947b

Please sign in to comment.