mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2025-08-10 11:01:05 +00:00
feat: cache the workdir of the release-notes-assistant (#69)
there is no need for additional testing: the existing tests covering the use of the release-notes-assistant will unconditionally use the cache and be proof it does not break things Reviewed-on: https://code.forgejo.org/actions/forgejo-release/pulls/69 Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
parent
76ca8d5b17
commit
26fe28ef1e
|
@ -57,6 +57,12 @@ inputs:
|
|||
runs:
|
||||
using: "composite"
|
||||
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
|
||||
shell: bash
|
||||
- run: |
|
||||
|
@ -78,6 +84,7 @@ runs:
|
|||
export PRERELEASE="${{ inputs.prerelease }}"
|
||||
|
||||
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 }}"
|
||||
|
||||
|
|
|
@ -120,7 +120,8 @@ maybe_use_release_note_assistant() {
|
|||
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
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue