fallback to env.GITHUB_SERVER_URL if FORGEJO is not set

This commit is contained in:
Earl Warren 2023-03-30 15:37:51 +02:00
parent ba62e00392
commit cb070c9a96
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 0579CB2928A78A00
2 changed files with 4 additions and 3 deletions

View file

@ -36,8 +36,11 @@ runs:
- run: |
export FORGEJO="${{ inputs.url }}"
if test -z "$FORGEJO"; then
export FORGEJO="${{ github.server_url }}"
export FORGEJO="${{ env.GITHUB_SERVER_URL }}"
fi
# A trailing / will mean http://forgejo//api/v1 is used
# and it always 401 as of v1.19, because of the double slash
FORGEJO=${FORGEJO%%/}
export REPO="${{ inputs.repo }}"
if test -z "$REPO"; then
export REPO="${{ github.repository }}"

View file

@ -8,7 +8,6 @@ jobs:
- id: release-upload
uses: SELF@vTest
with:
url: FORGEJO_URL
direction: upload
tag: v1.0
doer: testuser
@ -18,7 +17,6 @@ jobs:
- id: release-download
uses: SELF@vTest
with:
url: FORGEJO_URL
direction: download
tag: v1.0
doer: testuser