mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-12-26 06:42:17 -05:00
echo the sha in the output
This commit is contained in:
parent
62f8a3c3f3
commit
70be187923
3 changed files with 7 additions and 3 deletions
|
@ -10,6 +10,7 @@ jobs:
|
|||
./forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo:1.19
|
||||
./forgejo-runner.sh setup
|
||||
export FORGEJO_RUNNER_LOGS=forgejo-runner.log
|
||||
./forgejo-test-helper.sh run_workflow testdata/demo http://root:admin1234@$(cat forgejo-ip):3000 root demo setup-forgejo
|
||||
./forgejo-test-helper.sh run_workflow testdata/demo http://root:admin1234@$(cat forgejo-ip):3000 root demo setup-forgejo > /tmp/output
|
||||
grep '^sha=' /tmp/output
|
||||
./forgejo-test-helper.sh push_self_action http://root:admin1234@$(cat forgejo-ip):3000 root setup-forgejo vTest
|
||||
./forgejo-test-helper.sh run_workflow testdata/sanity-checks http://root:admin1234@$(cat forgejo-ip):3000 root sanity-check setup-forgejo
|
||||
|
|
|
@ -18,7 +18,8 @@ description: |
|
|||
`testrepo/.forgejo/workflows/*.yml` are replaced with `$forgejo/root/myaction`.
|
||||
* `forgejo-test-helper.sh push testrepo $forgejo root testrepo`
|
||||
Create the repository `$forgejo/root/testrepo` and populate it with the
|
||||
content of the `testrepo` directory.
|
||||
content of the `testrepo` directory. The SHA of the tip of the repository
|
||||
is in the output, starting with `sha=`.
|
||||
|
||||
The combination of `push_self_action` and `run_workflow` allows to
|
||||
run Forgejo Actions workflows from `testrepo` that use the action
|
||||
|
|
|
@ -63,7 +63,9 @@ function push() {
|
|||
git commit -m 'initial commit'
|
||||
git remote add origin $url/$owner/$project
|
||||
git push --force -u origin main
|
||||
git rev-parse HEAD > SHA
|
||||
sha=$(git rev-parse HEAD)
|
||||
echo $sha > SHA
|
||||
echo sha=$sha
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue