mirror of
https://code.forgejo.org/actions/forgejo-release
synced 2025-08-31 20:32:45 +02:00
Compare commits
15 commits
Author | SHA1 | Date | |
---|---|---|---|
|
9223b9c0d5 | ||
|
9f05f9811a | ||
|
25f6ec3fc2 | ||
|
c263d31a62 | ||
|
7b6b1cd6b6 | ||
|
5d24b53805 | ||
|
ac7e1b6ea3 | ||
|
777842e57f | ||
|
1c7fea91f7 | ||
|
c15813dcfb | ||
|
26fe28ef1e | ||
|
76ca8d5b17 | ||
|
d21db0da1a | ||
|
63485695ff | ||
|
466ca34619 |
5 changed files with 30 additions and 16 deletions
|
@ -6,7 +6,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
|
||||
- id: forgejo
|
||||
uses: https://code.forgejo.org/actions/setup-forgejo@v3.0.1
|
||||
uses: https://code.forgejo.org/actions/setup-forgejo@v3.0.2
|
||||
with:
|
||||
user: testuser
|
||||
password: admin1234
|
||||
|
@ -61,5 +61,11 @@ jobs:
|
|||
export VERBOSE=true
|
||||
testdata/forgejo-release-test.sh test_run testuser otherrepo
|
||||
|
||||
- if: failure()
|
||||
run: docker logs forgejo
|
||||
- if: always()
|
||||
name: '[RUNNER] and [FORGEJO] logs'
|
||||
run: |
|
||||
runner_logs="${{ steps.forgejo.outputs.runner-logs }}"
|
||||
if test -f "$runner_logs"; then
|
||||
sed -e 's/^/[RUNNER] /' < $runner_logs
|
||||
fi
|
||||
docker logs forgejo | sed -e 's/^/[FORGEJO] /'
|
||||
|
|
|
@ -42,7 +42,7 @@ jobs:
|
|||
runs-on: docker
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/forgejo-release@v2.6.1
|
||||
- uses: actions/forgejo-release@v2.7.2
|
||||
with:
|
||||
direction: upload
|
||||
url: https://my-forgejo-instance.net
|
||||
|
@ -63,7 +63,7 @@ jobs:
|
|||
runs-on: docker
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/forgejo-release@v2.6.1
|
||||
- uses: actions/forgejo-release@v2.7.2
|
||||
with:
|
||||
direction: download
|
||||
url: https://my-forgejo-instance.net
|
||||
|
|
21
action.yml
21
action.yml
|
@ -6,21 +6,21 @@ description: |
|
|||
inputs:
|
||||
url:
|
||||
description: 'URL of the Forgejo instance'
|
||||
default: '${{ env.GITHUB_SERVER_URL }}'
|
||||
default: '${{ env.FORGEJO_SERVER_URL }}'
|
||||
repo:
|
||||
description: 'owner/project relative to the URL'
|
||||
default: '${{ github.repository }}'
|
||||
default: '${{ forge.repository }}'
|
||||
tag:
|
||||
description: 'Tag of the release'
|
||||
default: '${{ github.ref_name }}'
|
||||
default: '${{ forge.ref_name }}'
|
||||
title:
|
||||
description: 'Title of the release (defaults to tag)'
|
||||
sha:
|
||||
description: 'SHA of the release'
|
||||
default: '${{ github.sha }}'
|
||||
default: '${{ forge.sha }}'
|
||||
token:
|
||||
description: 'Forgejo application token'
|
||||
default: '${{ secrets.GITHUB_TOKEN }}'
|
||||
default: '${{ forge.token }}'
|
||||
release-dir:
|
||||
description: 'Directory in whichs release assets are uploaded or downloaded'
|
||||
required: true
|
||||
|
@ -57,7 +57,13 @@ inputs:
|
|||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
|
||||
- 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: |
|
||||
export FORGEJO="${{ inputs.url }}"
|
||||
|
@ -78,10 +84,11 @@ 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 }}"
|
||||
|
||||
export TOKEN="${{ inputs.token }}"
|
||||
export TOKEN=${{ inputs.token }}
|
||||
|
||||
export RELEASE_DIR="${{ inputs.release-dir }}"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ if ${VERBOSE:-false}; then set -x; fi
|
|||
: ${RETRY:=1}
|
||||
: ${DELAY:=10}
|
||||
|
||||
RELEASE_NOTES_ASSISTANT_VERSION=v1.3.3 # renovate: datasource=forgejo-releases depName=forgejo/release-notes-assistant registryUrl=https://code.forgejo.org
|
||||
RELEASE_NOTES_ASSISTANT_VERSION=v1.4.0 # renovate: datasource=forgejo-releases depName=forgejo/release-notes-assistant registryUrl=https://code.forgejo.org
|
||||
|
||||
TAG_FILE="$TMP_DIR/tag$$.json"
|
||||
TAG_URL=$(echo "$TAG" | sed 's/\//%2F/g')
|
||||
|
@ -29,7 +29,7 @@ export GNUPGHOME
|
|||
setup_tea() {
|
||||
if which tea 2>/dev/null; then
|
||||
TEA_BIN=$(which tea)
|
||||
else ! test -f $TEA_BIN;
|
||||
elif ! test -f $TEA_BIN; then
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
curl -sL https://dl.gitea.io/tea/$TEA_VERSION/tea-$TEA_VERSION-linux-"$ARCH" >$TEA_BIN
|
||||
chmod +x $TEA_BIN
|
||||
|
@ -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" --token "$TOKEN" --forgejo-url "$SCHEME://$HOST" --repository $REPO --token "$TOKEN" release "$TAG"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- id: forgejo
|
||||
uses: https://code.forgejo.org/actions/setup-forgejo@v3.0.1
|
||||
uses: https://code.forgejo.org/actions/setup-forgejo@v3.0.2
|
||||
with:
|
||||
user: testuser
|
||||
password: admin1234
|
||||
|
|
Loading…
Add table
Reference in a new issue