From b818607d6171f62b8e172a482862548bc8a4ae86 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Fri, 31 Mar 2023 00:09:26 +0200 Subject: [PATCH] no doer --- .forgejo/workflows/integration.yml | 1 - README.md | 1 - action.yml | 3 --- forgejo-release.sh | 6 +----- testdata/forgejo-release-test.sh | 1 - testdata/nested-upload-download/.forgejo/workflows/test.yml | 2 -- testdata/upload-download/.forgejo/workflows/test.yml | 2 -- 7 files changed, 1 insertion(+), 15 deletions(-) diff --git a/.forgejo/workflows/integration.yml b/.forgejo/workflows/integration.yml index 7b5d0e7..09b3490 100644 --- a/.forgejo/workflows/integration.yml +++ b/.forgejo/workflows/integration.yml @@ -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 diff --git a/README.md b/README.md index 23a98cd..57472ee 100644 --- a/README.md +++ b/README.md @@ -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` | | diff --git a/action.yml b/action.yml index 410d190..d06dee9 100644 --- a/action.yml +++ b/action.yml @@ -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 }}" diff --git a/forgejo-release.sh b/forgejo-release.sh index 039ffe4..a5201ac 100755 --- a/forgejo-release.sh +++ b/forgejo-release.sh @@ -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 } diff --git a/testdata/forgejo-release-test.sh b/testdata/forgejo-release-test.sh index 0131212..49fcea2 100755 --- a/testdata/forgejo-release-test.sh +++ b/testdata/forgejo-release-test.sh @@ -69,7 +69,6 @@ test_run() { echo "================================ TEST END" } -: ${DOER:=root} : ${TAG:=v17.8.20-1} . $(dirname $0)/../forgejo-release.sh diff --git a/testdata/nested-upload-download/.forgejo/workflows/test.yml b/testdata/nested-upload-download/.forgejo/workflows/test.yml index 1dd19ea..6757499 100644 --- a/testdata/nested-upload-download/.forgejo/workflows/test.yml +++ b/testdata/nested-upload-download/.forgejo/workflows/test.yml @@ -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 diff --git a/testdata/upload-download/.forgejo/workflows/test.yml b/testdata/upload-download/.forgejo/workflows/test.yml index da90baa..7f37aa3 100644 --- a/testdata/upload-download/.forgejo/workflows/test.yml +++ b/testdata/upload-download/.forgejo/workflows/test.yml @@ -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') }}