mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 06:03:51 +03:00
87fd4eeaa5
This is a clean revert of the commits that led to grouping all jobs related to issue labeling into one workflow. The assumption that it would be more efficient was incorrect because it assumed the conditions for running each job would be evaluated statically Forgejo side. In reality the conditions are evaluated by the runner and multiplies the number of runs required instead of decreasing them. In turn, this clutters the status line of each pull request with numerous skipped runs. Finally it is more complex to maintain multiple jobs into a single workflow because the conditions for it to run have to be duplicated. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6178 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
on:
|
|
pull_request_target:
|
|
types:
|
|
- edited
|
|
- synchronize
|
|
- labeled
|
|
|
|
jobs:
|
|
release-notes:
|
|
if: ( vars.ROLE == 'forgejo-coding' ) && contains(github.event.pull_request.labels.*.name, 'worth a release-note')
|
|
runs-on: docker
|
|
container:
|
|
image: 'code.forgejo.org/oci/node:20-bookworm'
|
|
steps:
|
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
|
|
|
- name: event
|
|
run: |
|
|
cat <<'EOF'
|
|
${{ toJSON(github.event.pull_request.labels.*.name) }}
|
|
EOF
|
|
cat <<'EOF'
|
|
${{ toJSON(github.event) }}
|
|
EOF
|
|
|
|
- uses: https://code.forgejo.org/actions/setup-go@v5
|
|
with:
|
|
go-version-file: "go.mod"
|
|
cache: false
|
|
|
|
- name: apt install jq
|
|
run: |
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
apt-get update -qq
|
|
apt-get -q install -y -qq jq
|
|
|
|
- name: release-notes-assistant preview
|
|
run: |
|
|
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 }}
|