Move secrets out of gh action, and make it as input

This commit is contained in:
Griatch 2025-12-19 09:49:47 +01:00
parent a652cbea61
commit f2c61401f6
2 changed files with 7 additions and 2 deletions

View file

@ -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

View file

@ -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)