From af5923c7d47128798fee3cec5f61b947afa681bc Mon Sep 17 00:00:00 2001 From: xtex Date: Fri, 13 Dec 2024 21:19:44 +0800 Subject: [PATCH] feat: test FORGEJO_TOKEN --- actions/actions.sh | 4 ++++ .../.forgejo/workflows/test.yml | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 actions/example-branding-v10/.forgejo/workflows/test.yml diff --git a/actions/actions.sh b/actions/actions.sh index 321524a..8eb7a76 100755 --- a/actions/actions.sh +++ b/actions/actions.sh @@ -171,5 +171,9 @@ function test_actions() { if dpkg --compare-versions $version ge 9.0; then run actions_verify_example schedule-noncancel fi + + if dpkg --compare-versions $version ge 10.0 && dpkg --compare-versions $runner_version gt 5.0.4; then + run actions_verify_example branding-v10 + fi done } diff --git a/actions/example-branding-v10/.forgejo/workflows/test.yml b/actions/example-branding-v10/.forgejo/workflows/test.yml new file mode 100644 index 0000000..a51b8fa --- /dev/null +++ b/actions/example-branding-v10/.forgejo/workflows/test.yml @@ -0,0 +1,14 @@ +on: [push] + +jobs: + test: + runs-on: docker + container: + image: code.forgejo.org/oci/node:20-bookworm + steps: + - name: FORGEJO_TOKEN + run: | + set -x + test "$FORGEJO_TOKEN" + test "$FORGEJO_TOKEN" = "${{ env.FORGEJO_TOKEN }}" + test "$FORGEJO_TOKEN" = "${{ github.TOKEN }}"