mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2025-09-03 14:51:55 +03:00
feat: cache the workdir of the release-notes-assistant
This commit is contained in:
parent
76ca8d5b17
commit
611bcc7ac1
2 changed files with 9 additions and 1 deletions
|
@ -57,6 +57,12 @@ inputs:
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
- if: ${{ inputs.release-notes-assistant }}
|
||||||
|
uses: https://data.forgejo.org/actions/cache@v4
|
||||||
|
with:
|
||||||
|
key: rna-${{ inputs.repo }}
|
||||||
|
path: ${{ forge.action_path }}/rna
|
||||||
|
|
||||||
- run: echo "${{ forge.action_path }}" >> $FORGEJO_PATH
|
- run: echo "${{ forge.action_path }}" >> $FORGEJO_PATH
|
||||||
shell: bash
|
shell: bash
|
||||||
- run: |
|
- run: |
|
||||||
|
@ -78,6 +84,7 @@ runs:
|
||||||
export PRERELEASE="${{ inputs.prerelease }}"
|
export PRERELEASE="${{ inputs.prerelease }}"
|
||||||
|
|
||||||
export RELEASE_NOTES_ASSISTANT="${{ inputs.release-notes-assistant }}"
|
export RELEASE_NOTES_ASSISTANT="${{ inputs.release-notes-assistant }}"
|
||||||
|
export RELEASE_NOTES_ASSISTANT_WORKDIR=${{ forge.action_path }}/rna
|
||||||
|
|
||||||
export HIDE_ARCHIVE_LINK="${{ inputs.hide-archive-link }}"
|
export HIDE_ARCHIVE_LINK="${{ inputs.hide-archive-link }}"
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,8 @@ maybe_use_release_note_assistant() {
|
||||||
if "$RELEASE_NOTES_ASSISTANT"; then
|
if "$RELEASE_NOTES_ASSISTANT"; then
|
||||||
curl --fail -s -S -o rna https://code.forgejo.org/forgejo/release-notes-assistant/releases/download/$RELEASE_NOTES_ASSISTANT_VERSION/release-notes-assistant
|
curl --fail -s -S -o rna https://code.forgejo.org/forgejo/release-notes-assistant/releases/download/$RELEASE_NOTES_ASSISTANT_VERSION/release-notes-assistant
|
||||||
chmod +x ./rna
|
chmod +x ./rna
|
||||||
./rna --storage release --storage-location "$TAG" --forgejo-url "$SCHEME"://placeholder:"$TOKEN"@"$HOST" --repository $REPO --token "$TOKEN" release "$TAG"
|
mkdir -p $RELEASE_NOTES_ASSISTANT_WORKDIR
|
||||||
|
./rna --workdir=$RELEASE_NOTES_ASSISTANT_WORKDIR --storage release --storage-location "$TAG" --forgejo-url "$SCHEME"://placeholder:"$TOKEN"@"$HOST" --repository $REPO --token "$TOKEN" release "$TAG"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue