diff --git a/.github/workflows/validate-seasons.yml b/.github/workflows/validate-seasons.yml index 05b07ce..7b1e79c 100644 --- a/.github/workflows/validate-seasons.yml +++ b/.github/workflows/validate-seasons.yml @@ -8,13 +8,21 @@ on: - master paths: - "custom_mappings.yaml" - - "validate-tvdb.py" + - "*.py" env: PYTHON_VERSION: "3.10" jobs: validate-added-mappings: runs-on: ubuntu-latest steps: + # TODO: maybe make this step a pre-requisite to any CI flow + - name: Prevent file change + uses: xalvarez/prevent-file-change-action@v1 + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + pattern: *.py + trustedAuthors: evie-lau + allowNewFiles: false - uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/validate-tvdb.py b/validate-tvdb.py index 3349aae..f988b63 100644 --- a/validate-tvdb.py +++ b/validate-tvdb.py @@ -4,7 +4,7 @@ from pathlib import Path # Load API Key and initialize tvdb -load_dotenv(Path(".env")) +load_dotenv() apikey = os.getenv("TVDB_API_KEY") tvdb = tvdb_v4_official.TVDB(apikey)