1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-forgejo synced 2025-06-08 03:58:19 +02:00

do not rely on a hacky way to obtain the sha of the branch

This commit is contained in:
Earl Warren 2023-10-07 23:27:24 +02:00
parent 179856df25
commit 7b5b59d821
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
4 changed files with 15 additions and 8 deletions

View file

@ -31,10 +31,11 @@ jobs:
#
forgejo-runner.sh setup
export FORGEJO_RUNNER_LOGS=forgejo-runner.log
url=http://root:admin1234@$(cat forgejo-ip):3000
token=$(cat forgejo-token)
echo "============================ demo ==================="
./forgejo-test-helper.sh run_workflow testdata/demo http://root:admin1234@$(cat forgejo-ip):3000 root demo setup-forgejo $(cat forgejo-token) > /tmp/output
grep '^sha=' /tmp/output
forgejo-test-helper.sh run_workflow testdata/demo $url root demo setup-forgejo $token
function run() {
local example=$1
@ -51,7 +52,7 @@ jobs:
echo "============================ RUN example-$example ==================="
bash -ex $EXAMPLE_DIR/run.sh || return 1
else
forgejo-test-helper.sh run_workflow testdata/example-$example http://root:admin1234@$(cat forgejo-ip):3000 root example-$example setup-forgejo $(cat forgejo-token) || return 1
forgejo-test-helper.sh run_workflow testdata/example-$example $url root example-$example setup-forgejo $token || return 1
fi
if test -f $EXAMPLE_DIR/teardown.sh ; then