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.

Merge pull request 'chore(ci): merge jobs issue label jobs in one workflow' (#6021) from earl-warren/forgejo:wip-ci-labels into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6021
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>

+205 -199
-44
.forgejo/workflows/backport.yml
··· 1 - # Copyright 2024 The Forgejo Authors 2 - # SPDX-License-Identifier: MIT 3 - # 4 - name: issue-labels 5 - 6 - on: 7 - pull_request_target: 8 - types: 9 - - closed 10 - - labeled 11 - 12 - jobs: 13 - backporting: 14 - if: > 15 - vars.ROLE == 'forgejo-coding' && 16 - 17 - secrets.BACKPORT_TOKEN != '' && 18 - 19 - github.event_name == 'pull_request_target' && 20 - ( 21 - github.event.pull_request.merged && 22 - contains(toJSON(github.event.pull_request.labels), 'backport/v') 23 - ) 24 - runs-on: docker 25 - container: 26 - image: 'code.forgejo.org/oci/node:20-bookworm' 27 - steps: 28 - - name: Debug info 29 - run: | 30 - cat <<'EOF' 31 - ${{ toJSON(github) }} 32 - EOF 33 - - uses: https://code.forgejo.org/actions/git-backporting@v4.8.4 34 - with: 35 - target-branch-pattern: "^backport/(?<target>(v.*))$" 36 - strategy: ort 37 - strategy-option: find-renames 38 - cherry-pick-options: -x 39 - auth: ${{ secrets.BACKPORT_TOKEN }} 40 - pull-request: ${{ github.event.pull_request.url }} 41 - auto-no-squash: true 42 - enable-err-notification: true 43 - git-user: forgejo-backport-action 44 - git-email: forgejo-backport-action@noreply.codeberg.org
-53
.forgejo/workflows/cascade-setup-end-to-end.yml
··· 1 - # Copyright 2024 The Forgejo Authors 2 - # SPDX-License-Identifier: MIT 3 - # 4 - name: issue-labels 5 - 6 - on: 7 - pull_request_target: 8 - types: 9 - - labeled 10 - 11 - jobs: 12 - end-to-end: 13 - if: > 14 - vars.ROLE == 'forgejo-coding' && 15 - 16 - secrets.END_TO_END_CASCADING_PR_DESTINATION != '' && 17 - secrets.END_TO_END_CASCADING_PR_ORIGIN != '' && 18 - 19 - ( 20 - github.event_name == 'push' || 21 - ( 22 - github.event_name == 'pull_request_target' && 23 - github.event.action == 'label_updated' && 24 - github.event.label.name == 'run-end-to-end-tests' 25 - ) 26 - ) 27 - runs-on: docker 28 - container: 29 - image: code.forgejo.org/oci/node:20-bookworm 30 - steps: 31 - - name: Debug info 32 - run: | 33 - cat <<'EOF' 34 - ${{ toJSON(github) }} 35 - EOF 36 - - uses: actions/checkout@v4 37 - with: 38 - fetch-depth: '0' 39 - show-progress: 'false' 40 - - uses: actions/cascading-pr@v2 41 - with: 42 - origin-url: ${{ env.GITHUB_SERVER_URL }} 43 - origin-repo: ${{ github.repository }} 44 - origin-token: ${{ secrets.END_TO_END_CASCADING_PR_ORIGIN }} 45 - origin-pr: ${{ github.event.pull_request.number }} 46 - origin-ref: ${{ github.event_name == 'push' && github.event.ref || '' }} 47 - destination-url: https://code.forgejo.org 48 - destination-fork-repo: cascading-pr/end-to-end 49 - destination-repo: forgejo/end-to-end 50 - destination-branch: main 51 - destination-token: ${{ secrets.END_TO_END_CASCADING_PR_DESTINATION }} 52 - close-merge: true 53 - update: .forgejo/cascading-pr-end-to-end
+205
.forgejo/workflows/issue-labels.yml
··· 1 + # Copyright 2024 The Forgejo Authors 2 + # SPDX-License-Identifier: MIT 3 + # 4 + # To modify the pull_request_target jobs: 5 + # 6 + # - push it to the wip-ci-issue-labels branch on the forgejo repository 7 + # otherwise it will not have access to the required secrets. 8 + # 9 + # - once it works, open a pull request for the sake of keeping track 10 + # of the change even if the PR won't run it because it will use 11 + # whatever is in the default branch instead 12 + # 13 + # - after it is merged, double check it works by changing the labels 14 + # to trigger the job. 15 + # 16 + name: issue-labels 17 + 18 + on: 19 + push: 20 + branches: 21 + - 'wip-ci-issue-labels' 22 + 23 + pull_request_target: 24 + types: 25 + - closed 26 + - edited 27 + - labeled 28 + - synchronize 29 + 30 + pull_request: 31 + types: 32 + - edited 33 + - labeled 34 + - opened 35 + - synchronize 36 + 37 + jobs: 38 + info: 39 + if: vars.ROLE == 'forgejo-coding' 40 + runs-on: docker 41 + container: 42 + image: code.forgejo.org/oci/node:20-bookworm 43 + steps: 44 + - name: Debug info 45 + run: | 46 + cat <<'EOF' 47 + ${{ toJSON(github) }} 48 + EOF 49 + 50 + end-to-end: 51 + if: > 52 + vars.ROLE == 'forgejo-coding' && 53 + 54 + secrets.END_TO_END_CASCADING_PR_DESTINATION != '' && 55 + secrets.END_TO_END_CASCADING_PR_ORIGIN != '' && 56 + 57 + ( 58 + github.event_name == 'push' || 59 + ( 60 + github.event_name == 'pull_request_target' && 61 + github.event.action == 'label_updated' && 62 + github.event.label.name == 'run-end-to-end-tests' 63 + ) 64 + ) 65 + runs-on: docker 66 + container: 67 + image: code.forgejo.org/oci/node:20-bookworm 68 + steps: 69 + - name: Debug info 70 + run: | 71 + cat <<'EOF' 72 + ${{ toJSON(github) }} 73 + EOF 74 + - uses: actions/checkout@v4 75 + with: 76 + fetch-depth: '0' 77 + show-progress: 'false' 78 + - uses: actions/cascading-pr@v2 79 + with: 80 + origin-url: ${{ env.GITHUB_SERVER_URL }} 81 + origin-repo: ${{ github.repository }} 82 + origin-token: ${{ secrets.END_TO_END_CASCADING_PR_ORIGIN }} 83 + origin-pr: ${{ github.event.pull_request.number }} 84 + origin-ref: ${{ github.event_name == 'push' && github.event.ref || '' }} 85 + destination-url: https://code.forgejo.org 86 + destination-fork-repo: cascading-pr/end-to-end 87 + destination-repo: forgejo/end-to-end 88 + destination-branch: main 89 + destination-token: ${{ secrets.END_TO_END_CASCADING_PR_DESTINATION }} 90 + close-merge: true 91 + update: .forgejo/cascading-pr-end-to-end 92 + 93 + backporting: 94 + if: > 95 + vars.ROLE == 'forgejo-coding' && 96 + 97 + secrets.BACKPORT_TOKEN != '' && 98 + 99 + github.event_name == 'pull_request_target' && 100 + ( 101 + github.event.pull_request.merged && 102 + contains(toJSON(github.event.pull_request.labels), 'backport/v') 103 + ) 104 + runs-on: docker 105 + container: 106 + image: 'code.forgejo.org/oci/node:20-bookworm' 107 + steps: 108 + - name: Debug info 109 + run: | 110 + cat <<'EOF' 111 + ${{ toJSON(github) }} 112 + EOF 113 + - uses: https://code.forgejo.org/actions/git-backporting@v4.8.4 114 + with: 115 + target-branch-pattern: "^backport/(?<target>(v.*))$" 116 + strategy: ort 117 + strategy-option: find-renames 118 + cherry-pick-options: -x 119 + auth: ${{ secrets.BACKPORT_TOKEN }} 120 + pull-request: ${{ github.event.pull_request.url }} 121 + auto-no-squash: true 122 + enable-err-notification: true 123 + git-user: forgejo-backport-action 124 + git-email: forgejo-backport-action@noreply.codeberg.org 125 + 126 + merge-conditions: 127 + if: > 128 + vars.ROLE == 'forgejo-coding' && 129 + 130 + github.event_name == 'pull_request' && 131 + ( 132 + github.event.action == 'label_updated' || 133 + github.event.action == 'edited' || 134 + github.event.action == 'opened' 135 + ) 136 + runs-on: docker 137 + container: 138 + image: 'code.forgejo.org/oci/node:20-bookworm' 139 + steps: 140 + - name: Debug info 141 + run: | 142 + cat <<'EOF' 143 + ${{ toJSON(github) }} 144 + EOF 145 + - name: Missing test label 146 + if: > 147 + !( 148 + contains(toJSON(github.event.pull_request.labels), 'test/present') 149 + || contains(toJSON(github.event.pull_request.labels), 'test/not-needed') 150 + || contains(toJSON(github.event.pull_request.labels), 'test/manual') 151 + ) 152 + run: | 153 + echo "Test label must be set to either 'present', 'not-needed' or 'manual'." 154 + exit 1 155 + - name: Missing manual test instructions 156 + if: > 157 + ( 158 + contains(toJSON(github.event.pull_request.labels), 'test/manual') 159 + && !contains(toJSON(github.event.pull_request.body), '# Test') 160 + ) 161 + run: | 162 + echo "Manual test label is set. The PR description needs to contain test steps introduced by a heading like:" 163 + echo "# Testing" 164 + exit 1 165 + 166 + release-notes: 167 + if: > 168 + vars.ROLE == 'forgejo-coding' && 169 + 170 + secrets.RELEASE_NOTES_ASSISTANT_TOKEN != '' && 171 + 172 + github.event_name == 'pull_request_target' && 173 + contains(github.event.pull_request.labels.*.name, 'worth a release-note') && 174 + ( 175 + github.event.action == 'label_updated' || 176 + github.event.action == 'edited' || 177 + github.event.action == 'synchronized' 178 + ) 179 + 180 + runs-on: docker 181 + container: 182 + image: 'code.forgejo.org/oci/node:20-bookworm' 183 + steps: 184 + - name: Debug info 185 + run: | 186 + cat <<'EOF' 187 + ${{ toJSON(github) }} 188 + EOF 189 + 190 + - uses: https://code.forgejo.org/actions/checkout@v4 191 + 192 + - uses: https://code.forgejo.org/actions/setup-go@v5 193 + with: 194 + go-version-file: "go.mod" 195 + cache: false 196 + 197 + - name: apt install jq 198 + run: | 199 + export DEBIAN_FRONTEND=noninteractive 200 + apt-get update -qq 201 + apt-get -q install -y -qq jq 202 + 203 + - name: release-notes-assistant preview 204 + run: | 205 + go run code.forgejo.org/forgejo/release-notes-assistant@v1.1.1 --config .release-notes-assistant.yaml --storage pr --storage-location ${{ github.event.pull_request.number }} --forgejo-url $GITHUB_SERVER_URL --repository $GITHUB_REPOSITORY --token ${{ secrets.RELEASE_NOTES_ASSISTANT_TOKEN }} preview ${{ github.event.pull_request.number }}
-52
.forgejo/workflows/merge-requirements.yml
··· 1 - # Copyright 2024 The Forgejo Authors 2 - # SPDX-License-Identifier: MIT 3 - 4 - name: issue-labels 5 - 6 - on: 7 - pull_request: 8 - types: 9 - - labeled 10 - - edited 11 - - opened 12 - 13 - jobs: 14 - merge-conditions: 15 - if: > 16 - vars.ROLE == 'forgejo-coding' && 17 - 18 - github.event_name == 'pull_request' && 19 - ( 20 - github.event.action == 'label_updated' || 21 - github.event.action == 'edited' || 22 - github.event.action == 'opened' 23 - ) 24 - runs-on: docker 25 - container: 26 - image: 'code.forgejo.org/oci/node:20-bookworm' 27 - steps: 28 - - name: Debug info 29 - run: | 30 - cat <<'EOF' 31 - ${{ toJSON(github) }} 32 - EOF 33 - - name: Missing test label 34 - if: > 35 - !( 36 - contains(toJSON(github.event.pull_request.labels), 'test/present') 37 - || contains(toJSON(github.event.pull_request.labels), 'test/not-needed') 38 - || contains(toJSON(github.event.pull_request.labels), 'test/manual') 39 - ) 40 - run: | 41 - echo "Test label must be set to either 'present', 'not-needed' or 'manual'." 42 - exit 1 43 - - name: Missing manual test instructions 44 - if: > 45 - ( 46 - contains(toJSON(github.event.pull_request.labels), 'test/manual') 47 - && !contains(toJSON(github.event.pull_request.body), '# Test') 48 - ) 49 - run: | 50 - echo "Manual test label is set. The PR description needs to contain test steps introduced by a heading like:" 51 - echo "# Testing" 52 - exit 1
-50
.forgejo/workflows/release-notes-assistant.yml
··· 1 - name: issue-labels 2 - 3 - on: 4 - pull_request_target: 5 - types: 6 - - edited 7 - - synchronize 8 - - labeled 9 - 10 - jobs: 11 - release-notes: 12 - if: > 13 - vars.ROLE == 'forgejo-coding' && 14 - 15 - secrets.RELEASE_NOTES_ASSISTANT_TOKEN != '' && 16 - 17 - github.event_name == 'pull_request_target' && 18 - contains(github.event.pull_request.labels.*.name, 'worth a release-note') && 19 - ( 20 - github.event.action == 'label_updated' || 21 - github.event.action == 'edited' || 22 - github.event.action == 'synchronized' 23 - ) 24 - 25 - runs-on: docker 26 - container: 27 - image: 'code.forgejo.org/oci/node:20-bookworm' 28 - steps: 29 - - name: Debug info 30 - run: | 31 - cat <<'EOF' 32 - ${{ toJSON(github) }} 33 - EOF 34 - 35 - - uses: https://code.forgejo.org/actions/checkout@v4 36 - 37 - - uses: https://code.forgejo.org/actions/setup-go@v5 38 - with: 39 - go-version-file: "go.mod" 40 - cache: false 41 - 42 - - name: apt install jq 43 - run: | 44 - export DEBIAN_FRONTEND=noninteractive 45 - apt-get update -qq 46 - apt-get -q install -y -qq jq 47 - 48 - - name: release-notes-assistant preview 49 - run: | 50 - go run code.forgejo.org/forgejo/release-notes-assistant@v1.1.1 --config .release-notes-assistant.yaml --storage pr --storage-location ${{ github.event.pull_request.number }} --forgejo-url $GITHUB_SERVER_URL --repository $GITHUB_REPOSITORY --token ${{ secrets.RELEASE_NOTES_ASSISTANT_TOKEN }} preview ${{ github.event.pull_request.number }}