Establish Twitcher for Redot #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check for secrets | |
| on: [push, pull_request] | |
| jobs: | |
| check-secrets: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Verify OAuth settings are clean | |
| run: | | |
| FILES="addons/twitcher/editor_oauth_setting.tres addons/twitcher/editor_oauth_settings.tres twitch_oauth_setting.tres twitch_oauth_settings.tres" | |
| for FILE in $FILES; do | |
| if [ -f "$FILE" ]; then | |
| # Check for client_id with a non-empty value | |
| if grep -E 'client_id = "[^"]+"' "$FILE"; then | |
| echo "::error file=$FILE::client_id must be empty before committing" | |
| exit 1 | |
| fi | |
| # Check for client_secret with a non-empty value | |
| if grep -E 'client_secret = "[^"]+"' "$FILE"; then | |
| echo "::error file=$FILE::client_secret must be empty before committing" | |
| exit 1 | |
| fi | |
| fi | |
| done |