loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use `gitea/test_env` image instead of `golang` (#23455)

The `safe.directory` setting was not executed for pull requests, which
made subsequent `deps-backend` target fail at `go mod download`. To fix
it, split thep and perform the git config unconditionally.

Example: https://drone.gitea.io/go-gitea/gitea/69477/4/3

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>

authored by

silverwind
Lunny Xiao
and committed by
GitHub
ea1b9262 f96eef87

+17 -32
+17 -32
.drone.yml
··· 26 26 - make deps-frontend 27 27 28 28 - name: deps-backend 29 - image: golang:1.20 29 + image: gitea/test_env:linux-1.20-amd64 30 30 pull: always 31 31 commands: 32 32 - make deps-backend ··· 90 90 depends_on: [deps-frontend] 91 91 92 92 - name: checks-backend 93 - image: golang:1.20 93 + image: gitea/test_env:linux-1.20-amd64 94 94 commands: 95 95 - make --always-make checks-backend # ensure the 'go-licenses' make target runs 96 96 depends_on: [deps-backend] ··· 111 111 depends_on: [deps-frontend] 112 112 113 113 - name: build-backend-no-gcc 114 - image: golang:1.19 # this step is kept as the lowest version of golang that we support 114 + image: gitea/test_env:linux-1.19-amd64 # this step is kept as the lowest version of golang that we support 115 115 pull: always 116 116 environment: 117 117 GOPROXY: https://goproxy.io ··· 123 123 path: /go 124 124 125 125 - name: build-backend-arm64 126 - image: golang:1.20 126 + image: gitea/test_env:linux-1.20-amd64 127 127 environment: 128 128 GOPROXY: https://goproxy.io 129 129 GOOS: linux ··· 138 138 path: /go 139 139 140 140 - name: build-backend-windows 141 - image: golang:1.20 141 + image: gitea/test_env:linux-1.20-amd64 142 142 environment: 143 143 GOPROXY: https://goproxy.io 144 144 GOOS: windows ··· 152 152 path: /go 153 153 154 154 - name: build-backend-386 155 - image: golang:1.20 155 + image: gitea/test_env:linux-1.20-amd64 156 156 environment: 157 157 GOPROXY: https://goproxy.io 158 158 GOOS: linux ··· 213 213 image: docker:git 214 214 pull: always 215 215 commands: 216 - - git config --global --add safe.directory /drone/src 217 216 - git fetch --tags --force 218 217 when: 219 218 event: ··· 221 220 - pull_request 222 221 223 222 - name: deps-backend 224 - image: golang:1.20 223 + image: gitea/test_env:linux-1.20-amd64 225 224 pull: always 226 225 commands: 227 226 - make deps-backend ··· 313 312 image: docker:git 314 313 pull: always 315 314 commands: 316 - - git config --global --add safe.directory /drone/src 317 315 - git fetch --tags --force 318 316 when: 319 317 event: ··· 321 319 - pull_request 322 320 323 321 - name: deps-backend 324 - image: golang:1.20 322 + image: gitea/test_env:linux-1.20-amd64 325 323 pull: always 326 324 commands: 327 325 - make deps-backend ··· 399 397 path: /go 400 398 401 399 - name: generate-coverage 402 - image: golang:1.20 400 + image: gitea/test_env:linux-1.20-amd64 403 401 commands: 404 402 - make coverage 405 403 environment: ··· 465 463 image: docker:git 466 464 pull: always 467 465 commands: 468 - - git config --global --add safe.directory /drone/src 469 466 - git fetch --tags --force 470 467 when: 471 468 event: ··· 473 470 - pull_request 474 471 475 472 - name: deps-backend 476 - image: golang:1.20 473 + image: gitea/test_env:linux-1.20-amd64 477 474 pull: always 478 475 commands: 479 476 - make deps-backend ··· 553 550 image: docker:git 554 551 pull: always 555 552 commands: 556 - - git config --global --add safe.directory /drone/src 557 553 - git fetch --tags --force 558 554 when: 559 555 event: ··· 561 557 - pull_request 562 558 563 559 - name: deps-backend 564 - image: golang:1.20 560 + image: gitea/test_env:linux-1.20-amd64 565 561 pull: always 566 562 commands: 567 563 - make deps-backend ··· 631 627 image: docker:git 632 628 pull: always 633 629 commands: 634 - - git config --global --add safe.directory /drone/src 635 630 - git fetch --tags --force 636 631 when: 637 632 event: ··· 639 634 - pull_request 640 635 641 636 - name: deps-backend 642 - image: golang:1.20 637 + image: gitea/test_env:linux-1.20-arm64 643 638 pull: always 644 639 commands: 645 640 - make deps-backend ··· 721 716 depends_on: [deps-frontend] 722 717 723 718 - name: deps-backend 724 - image: golang:1.18 719 + image: gitea/test_env:linux-1.20-amd64 725 720 pull: always 726 721 commands: 727 722 - make deps-backend ··· 830 825 831 826 steps: 832 827 - name: download 833 - image: golang:1.20 828 + image: gitea/test_env:linux-1.20-amd64 834 829 pull: always 835 830 commands: 836 831 - timeout -s ABRT 40m make generate-license generate-gitignore ··· 890 885 image: docker:git 891 886 pull: always 892 887 commands: 893 - - git config --global --add safe.directory /drone/src 894 888 - git fetch --tags --force 895 889 896 890 - name: deps-frontend ··· 900 894 - make deps-frontend 901 895 902 896 - name: deps-backend 903 - image: golang:1.20 897 + image: gitea/test_env:linux-1.20-amd64 904 898 pull: always 905 899 commands: 906 900 - make deps-backend ··· 1026 1020 image: docker:git 1027 1021 pull: always 1028 1022 commands: 1029 - - git config --global --add safe.directory /drone/src 1030 1023 - git fetch --tags --force 1031 1024 1032 1025 - name: deps-frontend ··· 1036 1029 - make deps-frontend 1037 1030 1038 1031 - name: deps-backend 1039 - image: golang:1.20 1032 + image: gitea/test_env:linux-1.20-amd64 1040 1033 pull: always 1041 1034 commands: 1042 1035 - make deps-backend ··· 1136 1129 1137 1130 steps: 1138 1131 - name: build-docs 1139 - image: golang:1.20 1132 + image: gitea/test_env:linux-1.20-amd64 1140 1133 commands: 1141 1134 - cd docs 1142 1135 - make trans-copy clean build ··· 1190 1183 image: docker:git 1191 1184 pull: always 1192 1185 commands: 1193 - - git config --global --add safe.directory /drone/src 1194 1186 - git fetch --tags --force 1195 1187 1196 1188 - name: publish ··· 1268 1260 image: docker:git 1269 1261 pull: always 1270 1262 commands: 1271 - - git config --global --add safe.directory /drone/src 1272 1263 - git fetch --tags --force 1273 1264 1274 1265 - name: publish ··· 1341 1332 image: docker:git 1342 1333 pull: always 1343 1334 commands: 1344 - - git config --global --add safe.directory /drone/src 1345 1335 - git fetch --tags --force 1346 1336 1347 1337 - name: publish ··· 1415 1405 image: docker:git 1416 1406 pull: always 1417 1407 commands: 1418 - - git config --global --add safe.directory /drone/src 1419 1408 - git fetch --tags --force 1420 1409 1421 1410 - name: publish ··· 1533 1522 image: docker:git 1534 1523 pull: always 1535 1524 commands: 1536 - - git config --global --add safe.directory /drone/src 1537 1525 - git fetch --tags --force 1538 1526 1539 1527 - name: publish ··· 1611 1599 image: docker:git 1612 1600 pull: always 1613 1601 commands: 1614 - - git config --global --add safe.directory /drone/src 1615 1602 - git fetch --tags --force 1616 1603 1617 1604 - name: publish ··· 1687 1674 image: docker:git 1688 1675 pull: always 1689 1676 commands: 1690 - - git config --global --add safe.directory /drone/src 1691 1677 - git fetch --tags --force 1692 1678 1693 1679 - name: publish ··· 1761 1747 image: docker:git 1762 1748 pull: always 1763 1749 commands: 1764 - - git config --global --add safe.directory /drone/src 1765 1750 - git fetch --tags --force 1766 1751 1767 1752 - name: publish