set token from FORGEJO_TOKEN in the test environment

This commit is contained in:
Earl Warren 2023-03-30 16:28:59 +02:00
parent cb070c9a96
commit 25027fcba8
No known key found for this signature in database
GPG Key ID: 0579CB2928A78A00
3 changed files with 6 additions and 4 deletions

View File

@ -15,8 +15,8 @@ jobs:
set -ex
export FORGEJO_RUNNER_LOGS="${{ steps.forgejo.outputs.runner-logs }}"
forgejo-test-helper.sh push_self_action http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser forgejo-release vTest
forgejo-test-helper.sh run_workflow testdata/upload-download http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser upload-download forgejo-release
forgejo-test-helper.sh run_workflow testdata/nested-upload-download http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser nested-upload-download forgejo-release
forgejo-test-helper.sh run_workflow testdata/upload-download http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser upload-download forgejo-release "${{ steps.forgejo.outputs.token }}"
forgejo-test-helper.sh run_workflow testdata/nested-upload-download http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser nested-upload-download forgejo-release "${{ steps.forgejo.outputs.token }}"
- name: 002
run: |
set -ex

View File

@ -52,10 +52,10 @@ runs:
export DOER="${{ inputs.doer }}"
export TOKEN="${{ inputs.token }}"
if test -z "$TOKEN"; then
export TOKEN="${{ github.token }}"
export TOKEN="${{ secrets.GITHUB_TOKEN }}"
fi
if test -z "$TOKEN"; then
export TOKEN="${{ secrets.GITHUB_TOKEN }}"
export TOKEN="${{ github.token }}"
fi
test "$TOKEN"
export RELEASE_DIR="${{ inputs.release-dir }}"

View File

@ -10,6 +10,7 @@ jobs:
with:
direction: upload
tag: v1.0
token: FORGEJO_TOKEN
doer: testuser
release-dir: upload-dir
release-notes: "RELEASE NOTES"
@ -19,6 +20,7 @@ jobs:
with:
direction: download
tag: v1.0
token: FORGEJO_TOKEN
doer: testuser
release-dir: download-dir
verbose: true