-
Notifications
You must be signed in to change notification settings - Fork 145
36 lines (33 loc) · 1.28 KB
/
pycafe-dashboards.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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