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.

fully replace drone with actions (#27556)

this builds binaries and docker images for tags

authored by

techknowlogick and committed by
GitHub
dc7cf7a9 4378f9df

+267 -431
-428
.drone.yml
··· 1 - --- 2 - kind: pipeline 3 - name: release-version 4 - 5 - platform: 6 - os: linux 7 - arch: amd64 8 - 9 - workspace: 10 - base: /source 11 - path: / 12 - 13 - trigger: 14 - event: 15 - - tag 16 - 17 - volumes: 18 - - name: deps 19 - temp: {} 20 - 21 - steps: 22 - - name: fetch-tags 23 - image: docker:git 24 - pull: always 25 - commands: 26 - - git fetch --tags --force 27 - 28 - - name: deps-frontend 29 - image: node:20 30 - pull: always 31 - commands: 32 - - make deps-frontend 33 - 34 - - name: deps-backend 35 - image: gitea/test_env:linux-1.20-amd64 36 - pull: always 37 - commands: 38 - - make deps-backend 39 - volumes: 40 - - name: deps 41 - path: /go 42 - 43 - - name: static 44 - image: techknowlogick/xgo:go-1.21.x 45 - pull: always 46 - commands: 47 - - apt-get update && apt-get -qqy install ca-certificates curl gnupg 48 - - mkdir -p /etc/apt/keyrings && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg 49 - - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" > /etc/apt/sources.list.d/nodesource.list 50 - - apt-get update && apt-get -qqy install nodejs 51 - - export PATH=$PATH:$GOPATH/bin 52 - - make release 53 - environment: 54 - GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not 55 - TAGS: bindata sqlite sqlite_unlock_notify 56 - DEBIAN_FRONTEND: noninteractive 57 - depends_on: [fetch-tags] 58 - volumes: 59 - - name: deps 60 - path: /go 61 - 62 - - name: gpg-sign 63 - image: plugins/gpgsign:1 64 - pull: always 65 - settings: 66 - detach_sign: true 67 - excludes: 68 - - "dist/release/*.sha256" 69 - files: 70 - - "dist/release/*" 71 - environment: 72 - GPGSIGN_KEY: 73 - from_secret: gpgsign_key 74 - GPGSIGN_PASSPHRASE: 75 - from_secret: gpgsign_passphrase 76 - depends_on: [static] 77 - 78 - - name: release-tag 79 - image: woodpeckerci/plugin-s3:latest 80 - pull: always 81 - settings: 82 - acl: 83 - from_secret: aws_s3_acl 84 - region: 85 - from_secret: aws_s3_region 86 - bucket: 87 - from_secret: aws_s3_bucket 88 - endpoint: 89 - from_secret: aws_s3_endpoint 90 - path_style: 91 - from_secret: aws_s3_path_style 92 - source: "dist/release/*" 93 - strip_prefix: dist/release/ 94 - target: "/gitea/${DRONE_TAG##v}" 95 - environment: 96 - AWS_ACCESS_KEY_ID: 97 - from_secret: aws_access_key_id 98 - AWS_SECRET_ACCESS_KEY: 99 - from_secret: aws_secret_access_key 100 - depends_on: [gpg-sign] 101 - 102 - - name: github 103 - image: plugins/github-release:latest 104 - pull: always 105 - settings: 106 - files: 107 - - "dist/release/*" 108 - file_exists: overwrite 109 - environment: 110 - GITHUB_TOKEN: 111 - from_secret: github_token 112 - depends_on: [gpg-sign] 113 - 114 - --- 115 - kind: pipeline 116 - type: docker 117 - name: docker-linux-amd64-release-version 118 - 119 - platform: 120 - os: linux 121 - arch: amd64 122 - 123 - trigger: 124 - ref: 125 - include: 126 - - "refs/tags/**" 127 - exclude: 128 - - "refs/tags/**-rc*" 129 - paths: 130 - exclude: 131 - - "docs/**" 132 - 133 - steps: 134 - - name: fetch-tags 135 - image: docker:git 136 - pull: always 137 - commands: 138 - - git fetch --tags --force 139 - 140 - - name: publish 141 - image: plugins/docker:latest 142 - pull: always 143 - settings: 144 - auto_tag: true 145 - auto_tag_suffix: linux-amd64 146 - repo: gitea/gitea 147 - build_args: 148 - - GOPROXY=https://goproxy.io 149 - password: 150 - from_secret: docker_password 151 - username: 152 - from_secret: docker_username 153 - environment: 154 - PLUGIN_MIRROR: 155 - from_secret: plugin_mirror 156 - DOCKER_BUILDKIT: 1 157 - when: 158 - event: 159 - exclude: 160 - - pull_request 161 - 162 - - name: publish-rootless 163 - image: plugins/docker:latest 164 - settings: 165 - dockerfile: Dockerfile.rootless 166 - auto_tag: true 167 - auto_tag_suffix: linux-amd64-rootless 168 - repo: gitea/gitea 169 - build_args: 170 - - GOPROXY=https://goproxy.io 171 - password: 172 - from_secret: docker_password 173 - username: 174 - from_secret: docker_username 175 - environment: 176 - PLUGIN_MIRROR: 177 - from_secret: plugin_mirror 178 - DOCKER_BUILDKIT: 1 179 - when: 180 - event: 181 - exclude: 182 - - pull_request 183 - --- 184 - 185 - kind: pipeline 186 - type: docker 187 - name: docker-linux-amd64-release-candidate-version 188 - 189 - platform: 190 - os: linux 191 - arch: amd64 192 - 193 - trigger: 194 - ref: 195 - - "refs/tags/**-rc*" 196 - paths: 197 - exclude: 198 - - "docs/**" 199 - 200 - steps: 201 - - name: fetch-tags 202 - image: docker:git 203 - pull: always 204 - commands: 205 - - git fetch --tags --force 206 - 207 - - name: publish 208 - image: plugins/docker:latest 209 - pull: always 210 - settings: 211 - tags: ${DRONE_TAG##v}-linux-amd64 212 - repo: gitea/gitea 213 - build_args: 214 - - GOPROXY=https://goproxy.io 215 - password: 216 - from_secret: docker_password 217 - username: 218 - from_secret: docker_username 219 - environment: 220 - PLUGIN_MIRROR: 221 - from_secret: plugin_mirror 222 - DOCKER_BUILDKIT: 1 223 - when: 224 - event: 225 - exclude: 226 - - pull_request 227 - 228 - - name: publish-rootless 229 - image: plugins/docker:latest 230 - settings: 231 - dockerfile: Dockerfile.rootless 232 - tags: ${DRONE_TAG##v}-linux-amd64-rootless 233 - repo: gitea/gitea 234 - build_args: 235 - - GOPROXY=https://goproxy.io 236 - password: 237 - from_secret: docker_password 238 - username: 239 - from_secret: docker_username 240 - environment: 241 - PLUGIN_MIRROR: 242 - from_secret: plugin_mirror 243 - DOCKER_BUILDKIT: 1 244 - when: 245 - event: 246 - exclude: 247 - - pull_request 248 - 249 - --- 250 - kind: pipeline 251 - type: docker 252 - name: docker-linux-arm64-release-version 253 - 254 - platform: 255 - os: linux 256 - arch: arm64 257 - 258 - trigger: 259 - ref: 260 - include: 261 - - "refs/tags/**" 262 - exclude: 263 - - "refs/tags/**-rc*" 264 - paths: 265 - exclude: 266 - - "docs/**" 267 - 268 - steps: 269 - - name: fetch-tags 270 - image: docker:git 271 - pull: always 272 - commands: 273 - - git fetch --tags --force 274 - 275 - - name: publish 276 - image: plugins/docker:latest 277 - pull: always 278 - settings: 279 - auto_tag: true 280 - auto_tag_suffix: linux-arm64 281 - repo: gitea/gitea 282 - build_args: 283 - - GOPROXY=https://goproxy.io 284 - password: 285 - from_secret: docker_password 286 - username: 287 - from_secret: docker_username 288 - environment: 289 - PLUGIN_MIRROR: 290 - from_secret: plugin_mirror 291 - DOCKER_BUILDKIT: 1 292 - when: 293 - event: 294 - exclude: 295 - - pull_request 296 - 297 - - name: publish-rootless 298 - image: plugins/docker:latest 299 - settings: 300 - dockerfile: Dockerfile.rootless 301 - auto_tag: true 302 - auto_tag_suffix: linux-arm64-rootless 303 - repo: gitea/gitea 304 - build_args: 305 - - GOPROXY=https://goproxy.io 306 - password: 307 - from_secret: docker_password 308 - username: 309 - from_secret: docker_username 310 - environment: 311 - PLUGIN_MIRROR: 312 - from_secret: plugin_mirror 313 - DOCKER_BUILDKIT: 1 314 - when: 315 - event: 316 - exclude: 317 - - pull_request 318 - 319 - --- 320 - kind: pipeline 321 - type: docker 322 - name: docker-linux-arm64-release-candidate-version 323 - 324 - platform: 325 - os: linux 326 - arch: arm64 327 - 328 - trigger: 329 - ref: 330 - - "refs/tags/**-rc*" 331 - paths: 332 - exclude: 333 - - "docs/**" 334 - 335 - steps: 336 - - name: fetch-tags 337 - image: docker:git 338 - pull: always 339 - commands: 340 - - git fetch --tags --force 341 - 342 - - name: publish 343 - image: plugins/docker:latest 344 - pull: always 345 - settings: 346 - tags: ${DRONE_TAG##v}-linux-arm64 347 - repo: gitea/gitea 348 - build_args: 349 - - GOPROXY=https://goproxy.io 350 - password: 351 - from_secret: docker_password 352 - username: 353 - from_secret: docker_username 354 - environment: 355 - PLUGIN_MIRROR: 356 - from_secret: plugin_mirror 357 - DOCKER_BUILDKIT: 1 358 - when: 359 - event: 360 - exclude: 361 - - pull_request 362 - 363 - - name: publish-rootless 364 - image: plugins/docker:latest 365 - settings: 366 - dockerfile: Dockerfile.rootless 367 - tags: ${DRONE_TAG##v}-linux-arm64-rootless 368 - repo: gitea/gitea 369 - build_args: 370 - - GOPROXY=https://goproxy.io 371 - password: 372 - from_secret: docker_password 373 - username: 374 - from_secret: docker_username 375 - environment: 376 - PLUGIN_MIRROR: 377 - from_secret: plugin_mirror 378 - DOCKER_BUILDKIT: 1 379 - when: 380 - event: 381 - exclude: 382 - - pull_request 383 - 384 - --- 385 - kind: pipeline 386 - type: docker 387 - name: docker-manifest-version 388 - 389 - platform: 390 - os: linux 391 - arch: amd64 392 - 393 - steps: 394 - - name: manifest-rootless 395 - image: plugins/manifest 396 - pull: always 397 - settings: 398 - auto_tag: true 399 - ignore_missing: true 400 - spec: docker/manifest.rootless.tmpl 401 - password: 402 - from_secret: docker_password 403 - username: 404 - from_secret: docker_username 405 - 406 - - name: manifest 407 - image: plugins/manifest 408 - settings: 409 - auto_tag: true 410 - ignore_missing: true 411 - spec: docker/manifest.tmpl 412 - password: 413 - from_secret: docker_password 414 - username: 415 - from_secret: docker_username 416 - 417 - trigger: 418 - ref: 419 - - "refs/tags/**" 420 - paths: 421 - exclude: 422 - - "docs/**" 423 - 424 - depends_on: 425 - - docker-linux-amd64-release-version 426 - - docker-linux-amd64-release-candidate-version 427 - - docker-linux-arm64-release-version 428 - - docker-linux-arm64-release-candidate-version
+1 -1
.github/workflows/release-nightly.yml
··· 1 - name: release-nightly-assets 1 + name: release-nightly 2 2 3 3 on: 4 4 push:
+125
.github/workflows/release-tag-rc.yml
··· 1 + name: release-tag-rc 2 + 3 + on: 4 + push: 5 + tags: 6 + - 'v1*-rc*' 7 + 8 + concurrency: 9 + group: ${{ github.workflow }}-${{ github.ref }} 10 + cancel-in-progress: false 11 + 12 + jobs: 13 + binary: 14 + runs-on: nscloud 15 + steps: 16 + - uses: actions/checkout@v4 17 + # fetch all commits instead of only the last as some branches are long lived and could have many between versions 18 + # fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567 19 + - run: git fetch --unshallow --quiet --tags --force 20 + - uses: actions/setup-go@v4 21 + with: 22 + go-version: "~1.21" 23 + check-latest: true 24 + - uses: actions/setup-node@v3 25 + with: 26 + node-version: 20 27 + - run: make deps-frontend deps-backend 28 + # xgo build 29 + - run: make release 30 + env: 31 + TAGS: bindata sqlite sqlite_unlock_notify 32 + - name: import gpg key 33 + id: import_gpg 34 + uses: crazy-max/ghaction-import-gpg@v5 35 + with: 36 + gpg_private_key: ${{ secrets.GPGSIGN_KEY }} 37 + passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }} 38 + - name: sign binaries 39 + run: | 40 + for f in dist/release/*; do 41 + echo '${{ secrets.GPGSIGN_PASSPHRASE }}' | gpg --pinentry-mode loopback --passphrase-fd 0 --batch --yes --detach-sign -u ${{ steps.import_gpg.outputs.fingerprint }} --output "$f.asc" "$f" 42 + done 43 + # clean branch name to get the folder name in S3 44 + - name: Get cleaned branch name 45 + id: clean_name 46 + run: | 47 + REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//') 48 + echo "Cleaned name is ${REF_NAME}" 49 + echo "branch=${REF_NAME}" >> "$GITHUB_OUTPUT" 50 + - name: configure aws 51 + uses: aws-actions/configure-aws-credentials@v4 52 + with: 53 + aws-region: ${{ secrets.AWS_REGION }} 54 + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} 55 + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 56 + - name: upload binaries to s3 57 + run: | 58 + aws s3 sync dist/release s3://${{ secrets.AWS_S3_BUCKET }}/gitea/${{ steps.clean_name.outputs.branch }} --no-progress 59 + - name: create github release 60 + run: | 61 + gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --draft --notes-from-tag dist/release/* 62 + env: 63 + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} 64 + docker-rootful: 65 + runs-on: ubuntu-latest 66 + steps: 67 + - uses: actions/checkout@v4 68 + # fetch all commits instead of only the last as some branches are long lived and could have many between versions 69 + # fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567 70 + - run: git fetch --unshallow --quiet --tags --force 71 + - uses: docker/setup-qemu-action@v2 72 + - uses: docker/setup-buildx-action@v2 73 + - uses: docker/metadata-action@v5 74 + id: meta 75 + with: 76 + images: gitea/gitea 77 + # 1.2.3-rc0 78 + tags: | 79 + type=semver,pattern={{version}} 80 + - name: Login to Docker Hub 81 + uses: docker/login-action@v2 82 + with: 83 + username: ${{ secrets.DOCKERHUB_USERNAME }} 84 + password: ${{ secrets.DOCKERHUB_TOKEN }} 85 + - name: build rootful docker image 86 + uses: docker/build-push-action@v4 87 + with: 88 + context: . 89 + platforms: linux/amd64,linux/arm64 90 + push: true 91 + tags: ${{ steps.meta.outputs.tags }} 92 + labels: ${{ steps.meta.outputs.labels }} 93 + docker-rootless: 94 + runs-on: ubuntu-latest 95 + steps: 96 + - uses: actions/checkout@v4 97 + # fetch all commits instead of only the last as some branches are long lived and could have many between versions 98 + # fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567 99 + - run: git fetch --unshallow --quiet --tags --force 100 + - uses: docker/setup-qemu-action@v2 101 + - uses: docker/setup-buildx-action@v2 102 + - uses: docker/metadata-action@v5 103 + id: meta 104 + with: 105 + images: gitea/gitea 106 + # each tag below will have the suffix of -rootless 107 + flavor: | 108 + suffix=-rootless 109 + # 1.2.3-rc0 110 + tags: | 111 + type=semver,pattern={{version}} 112 + - name: Login to Docker Hub 113 + uses: docker/login-action@v2 114 + with: 115 + username: ${{ secrets.DOCKERHUB_USERNAME }} 116 + password: ${{ secrets.DOCKERHUB_TOKEN }} 117 + - name: build rootless docker image 118 + uses: docker/build-push-action@v4 119 + with: 120 + context: . 121 + platforms: linux/amd64,linux/arm64 122 + push: true 123 + file: Dockerfile.rootless 124 + tags: ${{ steps.meta.outputs.tags }} 125 + labels: ${{ steps.meta.outputs.labels }}
+141
.github/workflows/release-tag-version.yml
··· 1 + name: release-tag-version 2 + 3 + on: 4 + push: 5 + tags: 6 + - 'v1.*' 7 + - '!v1*-rc*' 8 + - '!v1*-dev' 9 + 10 + concurrency: 11 + group: ${{ github.workflow }}-${{ github.ref }} 12 + cancel-in-progress: false 13 + 14 + jobs: 15 + binary: 16 + runs-on: nscloud 17 + steps: 18 + - uses: actions/checkout@v4 19 + # fetch all commits instead of only the last as some branches are long lived and could have many between versions 20 + # fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567 21 + - run: git fetch --unshallow --quiet --tags --force 22 + - uses: actions/setup-go@v4 23 + with: 24 + go-version: "~1.21" 25 + check-latest: true 26 + - uses: actions/setup-node@v3 27 + with: 28 + node-version: 20 29 + - run: make deps-frontend deps-backend 30 + # xgo build 31 + - run: make release 32 + env: 33 + TAGS: bindata sqlite sqlite_unlock_notify 34 + - name: import gpg key 35 + id: import_gpg 36 + uses: crazy-max/ghaction-import-gpg@v5 37 + with: 38 + gpg_private_key: ${{ secrets.GPGSIGN_KEY }} 39 + passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }} 40 + - name: sign binaries 41 + run: | 42 + for f in dist/release/*; do 43 + echo '${{ secrets.GPGSIGN_PASSPHRASE }}' | gpg --pinentry-mode loopback --passphrase-fd 0 --batch --yes --detach-sign -u ${{ steps.import_gpg.outputs.fingerprint }} --output "$f.asc" "$f" 44 + done 45 + # clean branch name to get the folder name in S3 46 + - name: Get cleaned branch name 47 + id: clean_name 48 + run: | 49 + REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//') 50 + echo "Cleaned name is ${REF_NAME}" 51 + echo "branch=${REF_NAME}" >> "$GITHUB_OUTPUT" 52 + - name: configure aws 53 + uses: aws-actions/configure-aws-credentials@v4 54 + with: 55 + aws-region: ${{ secrets.AWS_REGION }} 56 + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} 57 + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 58 + - name: upload binaries to s3 59 + run: | 60 + aws s3 sync dist/release s3://${{ secrets.AWS_S3_BUCKET }}/gitea/${{ steps.clean_name.outputs.branch }} --no-progress 61 + - name: create github release 62 + run: | 63 + gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --draft --notes-from-tag dist/release/* 64 + env: 65 + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} 66 + docker-rootful: 67 + runs-on: ubuntu-latest 68 + steps: 69 + - uses: actions/checkout@v4 70 + # fetch all commits instead of only the last as some branches are long lived and could have many between versions 71 + # fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567 72 + - run: git fetch --unshallow --quiet --tags --force 73 + - uses: docker/setup-qemu-action@v2 74 + - uses: docker/setup-buildx-action@v2 75 + - uses: docker/metadata-action@v5 76 + id: meta 77 + with: 78 + images: gitea/gitea 79 + # this will generate tags in the following format: 80 + # latest 81 + # 1 82 + # 1.2 83 + # 1.2.3 84 + tags: | 85 + type=raw,value=latest 86 + type=semver,pattern={{major}} 87 + type=semver,pattern={{major}}.{{minor}} 88 + type=semver,pattern={{version}} 89 + - name: Login to Docker Hub 90 + uses: docker/login-action@v2 91 + with: 92 + username: ${{ secrets.DOCKERHUB_USERNAME }} 93 + password: ${{ secrets.DOCKERHUB_TOKEN }} 94 + - name: build rootful docker image 95 + uses: docker/build-push-action@v4 96 + with: 97 + context: . 98 + platforms: linux/amd64,linux/arm64 99 + push: true 100 + tags: ${{ steps.meta.outputs.tags }} 101 + labels: ${{ steps.meta.outputs.labels }} 102 + docker-rootless: 103 + runs-on: ubuntu-latest 104 + steps: 105 + - uses: actions/checkout@v4 106 + # fetch all commits instead of only the last as some branches are long lived and could have many between versions 107 + # fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567 108 + - run: git fetch --unshallow --quiet --tags --force 109 + - uses: docker/setup-qemu-action@v2 110 + - uses: docker/setup-buildx-action@v2 111 + - uses: docker/metadata-action@v5 112 + id: meta 113 + with: 114 + images: gitea/gitea 115 + # each tag below will have the suffix of -rootless 116 + flavor: | 117 + suffix=-rootless 118 + # this will generate tags in the following format (with -rootless suffix added): 119 + # latest 120 + # 1 121 + # 1.2 122 + # 1.2.3 123 + tags: | 124 + type=raw,value=latest 125 + type=semver,pattern={{major}} 126 + type=semver,pattern={{major}}.{{minor}} 127 + type=semver,pattern={{version}} 128 + - name: Login to Docker Hub 129 + uses: docker/login-action@v2 130 + with: 131 + username: ${{ secrets.DOCKERHUB_USERNAME }} 132 + password: ${{ secrets.DOCKERHUB_TOKEN }} 133 + - name: build rootless docker image 134 + uses: docker/build-push-action@v4 135 + with: 136 + context: . 137 + platforms: linux/amd64,linux/arm64 138 + push: true 139 + file: Dockerfile.rootless 140 + tags: ${{ steps.meta.outputs.tags }} 141 + labels: ${{ steps.meta.outputs.labels }}
-2
.yamllint.yaml
··· 24 24 document-start: 25 25 level: error 26 26 present: false 27 - ignore: | 28 - /.drone.yml 29 27 30 28 document-end: 31 29 present: false