Skip to content

Commit

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

[v23.3.x] gha: fix pip install on python actions
  • Loading branch information
clee authored Oct 14, 2024
2 parents e3694b4 + 951bda7 commit ee4a62a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
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

0 comments on commit ee4a62a

Please sign in to comment.