Skip to content

Commit

Permalink
🐛 Fix dependabot PR main ref (#2655)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Zunker <[email protected]>
  • Loading branch information
czunker authored Nov 27, 2023
1 parent 58c814e commit 95225d0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pr-test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
id: cnquerygomod
if: ((github.event_name == 'push' && github.ref_name != 'main') || github.event_name == 'pull_request') && github.actor == 'dependabot[bot]'
run: |
echo "COUNT_GOMOD=$(git diff-tree --name-only -r HEAD~1..HEAD | grep -c -E "^go.mod$")" >> $GITHUB_OUTPUT
echo "COUNT_GOMOD=$(git diff-tree --name-only -r origin/${{github.ref_name}} origin/main | grep -c -E "^go.mod$")" >> $GITHUB_OUTPUT
- name: Fix providers go.mod for dependabot PRs
if: github.actor == 'dependabot[bot]' && steps.cnquerygomod.outputs.COUNT_GOMOD == '1'
Expand All @@ -106,7 +106,8 @@ jobs:
git config --global user.name "Mondoo Tools"
git add providers/
git commit -m "🧹 Update providers go.mod for dependabot PR ${{ github.event.number }}"
git push
git push
shell: bash

- name: Test cnquery
run: make test/go/plain-ci
Expand Down

0 comments on commit 95225d0

Please sign in to comment.