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
export FORGEJO="${{ steps.forgejo.outputs.url }}"
export TOKEN="${{ steps.forgejo.outputs.token }}"
export DOER=testuser
export VERBOSE=true
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` | |
| tag | Tag of the release | `false` | |
| sha | SHA of the release | `false` | |
| doer | Forgejo user authoring the upload | `false` | |
| token | Forgejo application token | `true` | |
| release-dir | Directory in whichs release assets are uploaded or downloaded | `true` | |
| release-notes | Release notes | `false` | |

View file

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

View file

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

View file

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

View file

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

View file

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