mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-31 18:30:58 +00:00
chore(ci): add release-notes-assistant to pull requests
This commit is contained in:
parent
8167d32c75
commit
9e20ddebeb
1 changed files with 47 additions and 0 deletions
47
.forgejo/workflows/release-notes-assistant.yml
Normal file
47
.forgejo/workflows/release-notes-assistant.yml
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
#
|
||||||
|
# secrets.RELEASE_NOTES_ASSISTANT_TOKEN issued by https://code.forgejo.org/release-notes-assistant-bot with write:issue, write:repository, write:organization and member of the https://code.forgejo.org/org/forgejo/teams/release-notes-assistant team that further tune the access
|
||||||
|
#
|
||||||
|
name: issue-labels
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- edited
|
||||||
|
- synchronize
|
||||||
|
- labeled
|
||||||
|
|
||||||
|
env:
|
||||||
|
RNA_VERSION: v1.3.3 # renovate: datasource=forgejo-releases depName=forgejo/release-notes-assistant registryUrl=https://code.forgejo.org
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release-notes:
|
||||||
|
if: vars.ROLE == 'forgejo-coding'
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: 'data.forgejo.org/oci/ci:1'
|
||||||
|
steps:
|
||||||
|
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||||
|
|
||||||
|
- name: event
|
||||||
|
run: |
|
||||||
|
cat <<'EOF'
|
||||||
|
${{ toJSON(forge.event.pull_request.labels.*.name) }}
|
||||||
|
EOF
|
||||||
|
cat <<'EOF'
|
||||||
|
${{ toJSON(forge.event) }}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
- uses: https://data.forgejo.org/actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version-file: "go.mod"
|
||||||
|
cache: false
|
||||||
|
|
||||||
|
- name: install release-notes-assistant
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
wget -O /usr/local/bin/rna https://code.forgejo.org/forgejo/release-notes-assistant/releases/download/${{ env.RNA_VERSION}}/release-notes-assistant
|
||||||
|
chmod +x /usr/local/bin/rna
|
||||||
|
|
||||||
|
- name: release-notes-assistant preview
|
||||||
|
run: |
|
||||||
|
rna --storage pr --storage-location ${{ forge.event.pull_request.number }} --forgejo-url $FORGEJO_SERVER_URL --repository $FORGEJO_REPOSITORY --token ${{ secrets.RELEASE_NOTES_ASSISTANT_TOKEN }} preview ${{ forge.event.pull_request.number }}
|
Loading…
Add table
Add a link
Reference in a new issue