PyCafe Playground Link #396
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PyCafe Playground Link | |
on: | |
workflow_run: | |
workflows: [Build] | |
types: | |
- completed | |
defaults: | |
run: | |
working-directory: vizro-core | |
env: | |
PYTHON_VERSION: "3.12" | |
jobs: | |
create-status: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install Hatch | |
run: pip install hatch | |
- name: Print PR Number | |
run: | | |
echo "Pull Request Number: ${{ github.event.workflow_run.pull_requests[0].number }}" | |
- name: Create PyCafe links | |
run: | | |
PR_NUMBER=${{ github.event.workflow_run.pull_requests[0].number || '' }} | |
if [ -n "$PR_NUMBER" ]; then | |
hatch run python ../tools/pycafe/create_pycafe_links.py --github-token ${{ github.token }} --repo-name ${{ github.repository }} --pr-number $PR_NUMBER --run-id ${{ github.event.workflow_run.id }} --commit-sha ${{ github.event.workflow_run.head_sha }} | |
else | |
hatch run python ../tools/pycafe/create_pycafe_links.py --github-token ${{ github.token }} --repo-name ${{ github.repository }} --run-id ${{ github.event.workflow_run.id }} --commit-sha ${{ github.event.workflow_run.head_sha }} | |
fi |