Skip to content

Commit 9c87335

Browse files
committed
fix(dependabot-automerge): calling gh label without repository
Workflows fail with failed to run git: fatal: not a git repository (or any of the parent directories): .git The problem is that there is no checkout sometimes when this action is called, thus no git directory. See https://github.com/grafana/otlp-gateway/actions/runs/16214262982/job/45780063018 Easy fix is to just provide the repo name. Signed-off-by: György Krajcsovits <[email protected]>
1 parent 8d8aa0c commit 9c87335

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/dependabot-automerge.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ jobs:
5757
if: ${{ steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor' && steps.dependabot-metadata.outputs.dependency-type == 'direct:production' && !contains(fromJSON(inputs.packages-minor-autoupdate), steps.dependabot-metadata.outputs.dependency-names) }}
5858
run: |
5959
gh pr comment $PR_URL --body "**Not approving** minor update to a non-allowlisted production dependency"
60-
gh label create requires-manual-approval || true
60+
gh label create "requires-manual-approval" --repo "$GITHUB_REPOSITORY" || true
6161
gh pr edit $PR_URL --add-label "requires-manual-approval"
6262
- name: Comment on major updates of production dependencies
6363
if: ${{ steps.dependabot-metadata.outputs.update-type == 'version-update:semver-major' && steps.dependabot-metadata.outputs.dependency-type == 'direct:production' }}
6464
run: |
6565
gh pr comment $PR_URL --body "**Not approving** major update to a production dependency"
66-
gh label create requires-manual-approval || true
66+
gh label create "requires-manual-approval" --repo "$GITHUB_REPOSITORY" || true
6767
gh pr edit $PR_URL --add-label "requires-manual-approval"

0 commit comments

Comments
 (0)