Compare commits

..

No commits in common. "main" and "v2.6.2" have entirely different histories.
main ... v2.6.2

5 changed files with 16 additions and 30 deletions

View file

@ -6,7 +6,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- id: forgejo - id: forgejo
uses: https://code.forgejo.org/actions/setup-forgejo@v3.0.2 uses: https://code.forgejo.org/actions/setup-forgejo@v3.0.1
with: with:
user: testuser user: testuser
password: admin1234 password: admin1234
@ -61,11 +61,5 @@ jobs:
export VERBOSE=true export VERBOSE=true
testdata/forgejo-release-test.sh test_run testuser otherrepo testdata/forgejo-release-test.sh test_run testuser otherrepo
- if: always() - if: failure()
name: '[RUNNER] and [FORGEJO] logs' run: docker logs forgejo
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] /'

View file

@ -42,7 +42,7 @@ jobs:
runs-on: docker runs-on: docker
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/forgejo-release@v2.7.2 - uses: actions/forgejo-release@v2.6.1
with: with:
direction: upload direction: upload
url: https://my-forgejo-instance.net url: https://my-forgejo-instance.net
@ -63,7 +63,7 @@ jobs:
runs-on: docker runs-on: docker
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/forgejo-release@v2.7.2 - uses: actions/forgejo-release@v2.6.1
with: with:
direction: download direction: download
url: https://my-forgejo-instance.net url: https://my-forgejo-instance.net

View file

@ -6,21 +6,21 @@ description: |
inputs: inputs:
url: url:
description: 'URL of the Forgejo instance' description: 'URL of the Forgejo instance'
default: '${{ env.FORGEJO_SERVER_URL }}' default: '${{ env.GITHUB_SERVER_URL }}'
repo: repo:
description: 'owner/project relative to the URL' description: 'owner/project relative to the URL'
default: '${{ forge.repository }}' default: '${{ github.repository }}'
tag: tag:
description: 'Tag of the release' description: 'Tag of the release'
default: '${{ forge.ref_name }}' default: '${{ github.ref_name }}'
title: title:
description: 'Title of the release (defaults to tag)' description: 'Title of the release (defaults to tag)'
sha: sha:
description: 'SHA of the release' description: 'SHA of the release'
default: '${{ forge.sha }}' default: '${{ github.sha }}'
token: token:
description: 'Forgejo application token' description: 'Forgejo application token'
default: '${{ forge.token }}' default: '${{ secrets.GITHUB_TOKEN }}'
release-dir: release-dir:
description: 'Directory in whichs release assets are uploaded or downloaded' description: 'Directory in whichs release assets are uploaded or downloaded'
required: true required: true
@ -57,13 +57,7 @@ inputs:
runs: runs:
using: "composite" using: "composite"
steps: steps:
- if: ${{ inputs.release-notes-assistant }} - run: echo "${{ github.action_path }}" >> $GITHUB_PATH
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 shell: bash
- run: | - run: |
export FORGEJO="${{ inputs.url }}" export FORGEJO="${{ inputs.url }}"
@ -84,11 +78,10 @@ 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 }}"
export TOKEN=${{ inputs.token }} export TOKEN="${{ inputs.token }}"
export RELEASE_DIR="${{ inputs.release-dir }}" export RELEASE_DIR="${{ inputs.release-dir }}"

View file

@ -19,7 +19,7 @@ if ${VERBOSE:-false}; then set -x; fi
: ${RETRY:=1} : ${RETRY:=1}
: ${DELAY:=10} : ${DELAY:=10}
RELEASE_NOTES_ASSISTANT_VERSION=v1.4.0 # renovate: datasource=forgejo-releases depName=forgejo/release-notes-assistant registryUrl=https://code.forgejo.org RELEASE_NOTES_ASSISTANT_VERSION=v1.3.3 # renovate: datasource=forgejo-releases depName=forgejo/release-notes-assistant registryUrl=https://code.forgejo.org
TAG_FILE="$TMP_DIR/tag$$.json" TAG_FILE="$TMP_DIR/tag$$.json"
TAG_URL=$(echo "$TAG" | sed 's/\//%2F/g') TAG_URL=$(echo "$TAG" | sed 's/\//%2F/g')
@ -29,7 +29,7 @@ export GNUPGHOME
setup_tea() { setup_tea() {
if which tea 2>/dev/null; then if which tea 2>/dev/null; then
TEA_BIN=$(which tea) TEA_BIN=$(which tea)
elif ! test -f $TEA_BIN; then else ! test -f $TEA_BIN;
ARCH=$(dpkg --print-architecture) ARCH=$(dpkg --print-architecture)
curl -sL https://dl.gitea.io/tea/$TEA_VERSION/tea-$TEA_VERSION-linux-"$ARCH" >$TEA_BIN curl -sL https://dl.gitea.io/tea/$TEA_VERSION/tea-$TEA_VERSION-linux-"$ARCH" >$TEA_BIN
chmod +x $TEA_BIN chmod +x $TEA_BIN
@ -120,8 +120,7 @@ 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
mkdir -p $RELEASE_NOTES_ASSISTANT_WORKDIR ./rna --storage release --storage-location "$TAG" --forgejo-url "$SCHEME"://placeholder:"$TOKEN"@"$HOST" --repository $REPO --token "$TOKEN" release "$TAG"
./rna --workdir=$RELEASE_NOTES_ASSISTANT_WORKDIR --storage release --storage-location "$TAG" --token "$TOKEN" --forgejo-url "$SCHEME://$HOST" --repository $REPO --token "$TOKEN" release "$TAG"
fi fi
} }

View file

@ -12,7 +12,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- id: forgejo - id: forgejo
uses: https://code.forgejo.org/actions/setup-forgejo@v3.0.2 uses: https://code.forgejo.org/actions/setup-forgejo@v3.0.1
with: with:
user: testuser user: testuser
password: admin1234 password: admin1234