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 set -ex
export FORGEJO_RUNNER_LOGS="${{ steps.forgejo.outputs.runner-logs }}" 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 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/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 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 - name: 002
run: | run: |
set -ex set -ex

View file

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

View file

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