key updated #6
This file contains 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: Hide API Keys | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
hide_keys: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Replace API keys | |
run: | | |
sed -i 's/GOOGLE_GEMINI_API_KEY=.*/GOOGLE_GEMINI_API_KEY="YOUR_API_KEY_HERE"/g' src/CREDS.py | |
- name: Commit changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add src/CREDS.py | |
git commit -m "Hide API keys" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.MY_ACCESS_TOKEN }} |