Skip to content

Commit

Permalink
Set safe dir for git operations in .drone.yml CI (go-gitea#19641)
Browse files Browse the repository at this point in the history
Our drone by necessity runs on git repositories not owned by the drone process. Unfortunately this means that git operations and thence CI builds will fail without the `safe.directory` option being set. 

See: https://drone.gitea.io/go-gitea/gitea/54632/2/8
  • Loading branch information
techknowlogick authored and AbdulrhmnGhanem committed Aug 23, 2022
1 parent e41165f commit 8436447
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ steps:
image: docker:git
pull: always
commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force
when:
event:
Expand Down Expand Up @@ -427,6 +428,7 @@ steps:
image: docker:git
pull: always
commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force
when:
event:
Expand Down Expand Up @@ -628,6 +630,7 @@ steps:
image: docker:git
pull: always
commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force

- name: deps-frontend
Expand Down Expand Up @@ -746,6 +749,7 @@ steps:
image: docker:git
pull: always
commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force

- name: deps-frontend
Expand Down Expand Up @@ -891,6 +895,7 @@ steps:
image: docker:git
pull: always
commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force

- name: publish
Expand Down Expand Up @@ -954,6 +959,7 @@ steps:
image: docker:git
pull: always
commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force

- name: publish
Expand Down Expand Up @@ -1016,6 +1022,7 @@ steps:
image: docker:git
pull: always
commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force

- name: publish
Expand Down Expand Up @@ -1112,6 +1119,7 @@ steps:
image: docker:git
pull: always
commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force

- name: publish
Expand Down Expand Up @@ -1175,6 +1183,7 @@ steps:
image: docker:git
pull: always
commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force

- name: publish
Expand Down Expand Up @@ -1237,6 +1246,7 @@ steps:
image: docker:git
pull: always
commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force

- name: publish
Expand Down

0 comments on commit 8436447

Please sign in to comment.