Skip to content

feat: Use rich Panel for showing warning in train_test_split #34

feat: Use rich Panel for showing warning in train_test_split

feat: Use rich Panel for showing warning in train_test_split #34

Workflow file for this run

name: cleanup PR
on:
pull_request_target:
types: [closed]
permissions: {}
defaults:
run:
shell: "bash"
jobs:
clean-artifacts:
if: always()
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Clean artifacts
run: |
set -u
ARTIFACTS=$( \
gh api \
--paginate \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/probabl-ai/skore/actions/artifacts \
| \
jq -c " \
.artifacts[] \
| select((.workflow_run.head_branch == \"${HEAD_BRANCH}\") and (.workflow_run.head_repository_id == ${HEAD_REPOSITORY_ID})) \
| {id: .id, name: .name} \
" \
)
for ARTIFACT in $ARTIFACTS; do
ID=$(echo "${ARTIFACT}" | jq -r '.id')
NAME=$(echo "${ARTIFACT}" | jq -r '.name')
echo "Deleting artifact (NAME: \"${NAME}\", ID: \"${ID}\")"
gh api \
--method DELETE \
--silent \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${REPOSITORY_OWNER}/${REPOSITORY_NAME}/actions/artifacts/${ID}
done
env:
GH_TOKEN: ${{ github.token }}
REPOSITORY_OWNER: ${{ github.repository_owner }}
REPOSITORY_NAME: ${{ github.event.repository.name }}
HEAD_REPOSITORY_ID: ${{ github.event.pull_request.head.repo.id }}
HEAD_BRANCH: ${{ github.head_ref }}
clean-documentation-preview:
if: always()
runs-on: ubuntu-latest
steps:
- name: Install `rclone`
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y rclone
- name: Copy configuration
shell: bash
run: echo "${CONFIGURATION}" > rclone.configuration
env:
CONFIGURATION: ${{ secrets.RCLONE_CONFIG_DOC_PREVIEW }}
- name: Clean documentation preview
run: rclone --config rclone.configuration purge "${PROVIDER}:${BUCKET}/${PULL_REQUEST_NUMBER}"
env:
PROVIDER: scaleway
BUCKET: ${{ vars.DOCUMENTATION_PREVIEW_BUCKET }}
PULL_REQUEST_NUMBER: ${{ github.event.number }}