Skip to content

Commit e55bb40

Browse files
committed
ci: fix git ownership error in make-rpm job
Add git safe.directory configuration before building RPMs to fix: fatal: detected dubious ownership in repository This occurs when running in a container where the checkout action creates files owned by a different user than the one running git commands in subsequent steps. Signed-off-by: Sarita Mahajan <sarmahaj@redhat.com>
1 parent 835dff8 commit e55bb40

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/greenboot-ci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757
ref: ${{ needs.check-pull-request.outputs.sha }}
5858
allow-unsafe-pr-checkout: true
5959

60+
- name: Fix git ownership
61+
run: git config --global --add safe.directory /__w/greenboot-rs/greenboot-rs
62+
6063
- name: Build RPMs
6164
run: |
6265
dnf install -y git make rpm-build rust-toolset

0 commit comments

Comments
 (0)