mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2024-11-21 15:40:58 -05:00
no doer
This commit is contained in:
parent
a9b7d752f4
commit
b818607d61
7 changed files with 1 additions and 15 deletions
|
@ -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
|
||||
|
|
|
@ -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` | |
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
1
testdata/forgejo-release-test.sh
vendored
1
testdata/forgejo-release-test.sh
vendored
|
@ -69,7 +69,6 @@ test_run() {
|
|||
echo "================================ TEST END"
|
||||
}
|
||||
|
||||
: ${DOER:=root}
|
||||
: ${TAG:=v17.8.20-1}
|
||||
|
||||
. $(dirname $0)/../forgejo-release.sh
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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') }}
|
||||
|
|
Loading…
Reference in a new issue