Browse Source

Set safe dir for git operations in .drone.yml CI (#19641)

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
tags/v1.18.0-dev
techknowlogick 2 years ago
parent
commit
cab3a8b59d
No account linked to committer's email address
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      .drone.yml

+ 10
- 0
.drone.yml View File

image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
when: when:
event: event:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
when: when:
event: event:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force


- name: deps-frontend - name: deps-frontend
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force


- name: deps-frontend - name: deps-frontend
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force


- name: publish - name: publish
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force


- name: publish - name: publish
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force


- name: publish - name: publish
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force


- name: publish - name: publish
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force


- name: publish - name: publish
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force


- name: publish - name: publish

Loading…
Cancel
Save