ydata profiling #142
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: Update new dataset metadata | |
on: | |
push: | |
branches-ignore: | |
- master | |
- gh-pages | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Create LFS file list | |
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id | |
- name: Restore LFS cache | |
uses: actions/cache@v3 | |
id: lfs-cache | |
with: | |
path: .git/lfs | |
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1 | |
- name: Git LFS Pull | |
run: git lfs pull | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
pip install ".[dev]" | |
sudo apt-get update | |
sudo apt-get install libssl-dev libcurl4-openssl-dev | |
- name: Update support files for new datasets | |
run: | | |
python -m pmlb.update_dataset_files | |
- name: Set deploy variables | |
run: | | |
BRANCH_REF=${{github.head_ref || github.ref}} | |
echo "BRANCH=${BRANCH_REF##*/}" >> $GITHUB_ENV | |
git config --local user.name 'github-actions[bot]' | |
git config --local user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Push updates to active branch | |
run: | | |
if git diff --quiet ; then | |
echo "No files changed, skipping commit and deployment." | |
else | |
echo "Changed files detected." | |
git add --all | |
WORKFLOW_URL="https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" | |
git commit \ | |
--message "update dataset files" \ | |
--message "Created by ${WORKFLOW_URL}\nfrom ${GITHUB_SHA::7} on $(date --iso --utc)" | |
git checkout $BRANCH | |
git push origin $BRANCH | |
fi |