From f35a001622ae0a5ca8d59231f26898e2aae83254 Mon Sep 17 00:00:00 2001 From: Dave Bunten Date: Tue, 12 Nov 2024 08:17:24 -0700 Subject: [PATCH] Fix Dependabot pre-commit check workflow (#171) * fix dependabot pre-commit checks * move to or instead of and --- .github/workflows/dependabot-pre-commit.yaml | 7 +++++-- .github/workflows/pre-commit-checks.yml | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependabot-pre-commit.yaml b/.github/workflows/dependabot-pre-commit.yaml index a228f2df..e165cf05 100644 --- a/.github/workflows/dependabot-pre-commit.yaml +++ b/.github/workflows/dependabot-pre-commit.yaml @@ -20,10 +20,13 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - - name: Set up Python - uses: actions/setup-python@v5 + - name: Install python env + uses: ./.github/actions/install-python-env with: python-version: "3.11" + - name: Install vale dependencies + run: | + poetry run vale sync - name: Install pre-commit run: python -m pip install pre-commit - name: Run pre-commit diff --git a/.github/workflows/pre-commit-checks.yml b/.github/workflows/pre-commit-checks.yml index ad0231c4..8dae41a7 100644 --- a/.github/workflows/pre-commit-checks.yml +++ b/.github/workflows/pre-commit-checks.yml @@ -10,6 +10,10 @@ on: jobs: pre_commit_checks: + # avoid running for pull requests from dependabot and instead rely on + # dependabot-pre-commit.yml workflow. + if: ${{ github.event_name != 'pull_request' || + github.actor != 'dependabot[bot]' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4