mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2024-11-06 03:25:45 -05:00
fallback to env.GITHUB_SERVER_URL if FORGEJO is not set
This commit is contained in:
parent
ba62e00392
commit
cb070c9a96
2 changed files with 4 additions and 3 deletions
|
@ -36,8 +36,11 @@ runs:
|
||||||
- run: |
|
- run: |
|
||||||
export FORGEJO="${{ inputs.url }}"
|
export FORGEJO="${{ inputs.url }}"
|
||||||
if test -z "$FORGEJO"; then
|
if test -z "$FORGEJO"; then
|
||||||
export FORGEJO="${{ github.server_url }}"
|
export FORGEJO="${{ env.GITHUB_SERVER_URL }}"
|
||||||
fi
|
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 }}"
|
export REPO="${{ inputs.repo }}"
|
||||||
if test -z "$REPO"; then
|
if test -z "$REPO"; then
|
||||||
export REPO="${{ github.repository }}"
|
export REPO="${{ github.repository }}"
|
||||||
|
|
|
@ -8,7 +8,6 @@ jobs:
|
||||||
- id: release-upload
|
- id: release-upload
|
||||||
uses: SELF@vTest
|
uses: SELF@vTest
|
||||||
with:
|
with:
|
||||||
url: FORGEJO_URL
|
|
||||||
direction: upload
|
direction: upload
|
||||||
tag: v1.0
|
tag: v1.0
|
||||||
doer: testuser
|
doer: testuser
|
||||||
|
@ -18,7 +17,6 @@ jobs:
|
||||||
- id: release-download
|
- id: release-download
|
||||||
uses: SELF@vTest
|
uses: SELF@vTest
|
||||||
with:
|
with:
|
||||||
url: FORGEJO_URL
|
|
||||||
direction: download
|
direction: download
|
||||||
tag: v1.0
|
tag: v1.0
|
||||||
doer: testuser
|
doer: testuser
|
||||||
|
|
Loading…
Reference in a new issue