From f2c61401f601fe3608cb6ee6fb14b5d163c812ab Mon Sep 17 00:00:00 2001 From: Griatch Date: Fri, 19 Dec 2025 09:49:47 +0100 Subject: [PATCH] Move secrets out of gh action, and make it as input --- .github/actions/run-tests/action.yml | 8 ++++++-- .github/workflows/github_action_test_suite.yml | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index c01e25a804..ee3fdc595c 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -26,6 +26,10 @@ inputs: description: "Whether to install psycopg2-binary package (true/false)." required: false default: "false" + coveralls-token: + description: "Coveralls repository token (optional, only needed for coverage tests)." + required: false + default: "" runs: using: "composite" @@ -89,10 +93,10 @@ runs: # it's also not critical if pushing to either service fails (happens for PRs since env is not # available outside of the evennia org) - name: Send data to Coveralls - if: ${{ inputs.coverage-test == 'true' && github.ref == 'refs/heads/main' }} + if: ${{ inputs.coverage-test == 'true' && github.ref == 'refs/heads/main' && inputs.coveralls-token != '' }} continue-on-error: true env: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + COVERALLS_REPO_TOKEN: ${{ inputs.coveralls-token }} working-directory: testing_mygame run: | coveralls diff --git a/.github/workflows/github_action_test_suite.yml b/.github/workflows/github_action_test_suite.yml index e13caf3612..51fb6f8018 100644 --- a/.github/workflows/github_action_test_suite.yml +++ b/.github/workflows/github_action_test_suite.yml @@ -43,6 +43,7 @@ jobs: coverage-test: ${{ matrix.coverage-test == true && 'true' || 'false' }} needs-postgres-package: "false" needs-mysql-package: "false" + coveralls-token: ${{ secrets.COVERALLS_REPO_TOKEN }} test-mysql: name: Test (MySQL)