This commit is contained in:
Earl Warren 2023-03-31 00:09:26 +02:00
parent a9b7d752f4
commit b818607d61
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
7 changed files with 1 additions and 15 deletions

View file

@ -30,6 +30,5 @@ jobs:
set -ex set -ex
export FORGEJO="${{ steps.forgejo.outputs.url }}" export FORGEJO="${{ steps.forgejo.outputs.url }}"
export TOKEN="${{ steps.forgejo.outputs.token }}" export TOKEN="${{ steps.forgejo.outputs.token }}"
export DOER=testuser
export VERBOSE=true export VERBOSE=true
testdata/forgejo-release-test.sh test_run testuser otherrepo testdata/forgejo-release-test.sh test_run testuser otherrepo

View file

@ -14,7 +14,6 @@ Upload or download the assets of a release to a Forgejo instance.
| repo | owner/project relative to the URL | `false` | | | repo | owner/project relative to the URL | `false` | |
| tag | Tag of the release | `false` | | | tag | Tag of the release | `false` | |
| sha | SHA of the release | `false` | | | sha | SHA of the release | `false` | |
| doer | Forgejo user authoring the upload | `false` | |
| token | Forgejo application token | `true` | | | token | Forgejo application token | `true` | |
| release-dir | Directory in whichs release assets are uploaded or downloaded | `true` | | | release-dir | Directory in whichs release assets are uploaded or downloaded | `true` | |
| release-notes | Release notes | `false` | | | release-notes | Release notes | `false` | |

View file

@ -11,8 +11,6 @@ inputs:
description: 'Tag of the release' description: 'Tag of the release'
sha: sha:
description: 'SHA of the release' description: 'SHA of the release'
doer:
description: 'Forgejo user authoring the upload'
token: token:
description: 'Forgejo application token' description: 'Forgejo application token'
required: true required: true
@ -49,7 +47,6 @@ runs:
if test -z "$TAG"; then if test -z "$TAG"; then
export TAG="${{ github.ref_name }}" export TAG="${{ github.ref_name }}"
fi fi
export DOER="${{ inputs.doer }}"
export TOKEN="${{ inputs.token }}" export TOKEN="${{ inputs.token }}"
if test -z "$TOKEN"; then if test -z "$TOKEN"; then
export TOKEN="${{ secrets.GITHUB_TOKEN }}" export TOKEN="${{ secrets.GITHUB_TOKEN }}"

View file

@ -44,11 +44,7 @@ upload_release() {
upload() { upload() {
setup_api setup_api
setup_tea setup_tea
if ! test "$DOER"; then GITEA_SERVER_TOKEN=$TOKEN $BIN_DIR/tea login add --url $FORGEJO
echo 'missing DOER'
return 1
fi
GITEA_SERVER_TOKEN=$TOKEN $BIN_DIR/tea login add --name $DOER --url $FORGEJO
upload_release upload_release
} }

View file

@ -69,7 +69,6 @@ test_run() {
echo "================================ TEST END" echo "================================ TEST END"
} }
: ${DOER:=root}
: ${TAG:=v17.8.20-1} : ${TAG:=v17.8.20-1}
. $(dirname $0)/../forgejo-release.sh . $(dirname $0)/../forgejo-release.sh

View file

@ -23,7 +23,6 @@ jobs:
repo: testuser/testrepo repo: testuser/testrepo
tag: v1.0 tag: v1.0
sha: ${{ steps.testrepo.outputs.sha }} sha: ${{ steps.testrepo.outputs.sha }}
doer: testuser
token: ${{ steps.forgejo.outputs.token }} token: ${{ steps.forgejo.outputs.token }}
release-dir: upload-dir release-dir: upload-dir
release-notes: "RELEASE NOTES" release-notes: "RELEASE NOTES"
@ -35,7 +34,6 @@ jobs:
url: ${{ steps.forgejo.outputs.url }} url: ${{ steps.forgejo.outputs.url }}
repo: testuser/testrepo repo: testuser/testrepo
tag: v1.0 tag: v1.0
doer: testuser
token: ${{ steps.forgejo.outputs.token }} token: ${{ steps.forgejo.outputs.token }}
release-dir: download-dir release-dir: download-dir
verbose: true verbose: true

View file

@ -17,7 +17,6 @@ jobs:
direction: upload direction: upload
tag: v1.0 tag: v1.0
token: FORGEJO_TOKEN token: FORGEJO_TOKEN
doer: testuser
release-dir: upload-dir release-dir: upload-dir
release-notes: "RELEASE NOTES" release-notes: "RELEASE NOTES"
verbose: true verbose: true
@ -28,7 +27,6 @@ jobs:
direction: download direction: download
tag: v1.0 tag: v1.0
token: FORGEJO_TOKEN token: FORGEJO_TOKEN
doer: testuser
release-dir: download-dir release-dir: download-dir
verbose: true verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }} - if: ${{ !startsWith(github.ref, 'refs/tags/v') }}