Move secrets out of gh action, and make it as input
This commit is contained in:
parent
a652cbea61
commit
f2c61401f6
2 changed files with 7 additions and 2 deletions
8
.github/actions/run-tests/action.yml
vendored
8
.github/actions/run-tests/action.yml
vendored
|
|
@ -26,6 +26,10 @@ inputs:
|
||||||
description: "Whether to install psycopg2-binary package (true/false)."
|
description: "Whether to install psycopg2-binary package (true/false)."
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
|
coveralls-token:
|
||||||
|
description: "Coveralls repository token (optional, only needed for coverage tests)."
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
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
|
# it's also not critical if pushing to either service fails (happens for PRs since env is not
|
||||||
# available outside of the evennia org)
|
# available outside of the evennia org)
|
||||||
- name: Send data to Coveralls
|
- 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
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
COVERALLS_REPO_TOKEN: ${{ inputs.coveralls-token }}
|
||||||
working-directory: testing_mygame
|
working-directory: testing_mygame
|
||||||
run: |
|
run: |
|
||||||
coveralls
|
coveralls
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ jobs:
|
||||||
coverage-test: ${{ matrix.coverage-test == true && 'true' || 'false' }}
|
coverage-test: ${{ matrix.coverage-test == true && 'true' || 'false' }}
|
||||||
needs-postgres-package: "false"
|
needs-postgres-package: "false"
|
||||||
needs-mysql-package: "false"
|
needs-mysql-package: "false"
|
||||||
|
coveralls-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||||
|
|
||||||
test-mysql:
|
test-mysql:
|
||||||
name: Test (MySQL)
|
name: Test (MySQL)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue