Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Feature/rnd 409 dataset load from huggingface #11

Feature/rnd 409 dataset load from huggingface

Feature/rnd 409 dataset load from huggingface #11

Workflow file for this run

name: check-pyproject-version
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check_version:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install "toml==0.10.2"
- name: Compare Versions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PYPROJECT_VERSION=$(python -c "import toml; print(toml.load('pyproject.toml')['tool']['poetry']['version'])")
echo "PYPROJECT_VERSION=${PYPROJECT_VERSION}"
GITHUB_RELEASE_VERSION=$(curl --silent "https://api.github.com/repos/climatepolicyradar/data-access/releases/latest" | jq -r '.tag_name')
# remove the "v" from the version
GITHUB_RELEASE_VERSION=${GITHUB_RELEASE_VERSION:1}
echo "GITHUB_RELEASE_VERSION=${GITHUB_RELEASE_VERSION}"
if [[ $PYPROJECT_VERSION > $GITHUB_RELEASE_VERSION ]]; then
echo "The pyproject.toml version is greater than the latest GitHub release."
else
echo "The pyproject.toml version is not greater than the latest GitHub release."
exit 1
fi