NitrAPI Check All Gameserver Details #2689
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: NitrAPI Check All Gameserver Details | |
on: | |
schedule: | |
- cron: '*/10 * * * *' # Runs every 10 minutes | |
jobs: | |
check_gameserver: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
pip install requests | |
- name: Run Gameserver Details Check | |
id: gameserver_check | |
env: | |
NITRADO_TOKEN: ${{ secrets.NITRADO_TOKEN }} # Your API key | |
run: | | |
python gameserver_check_all.py > README.md | |
echo "## Summary of Gameserver Details" >> $GITHUB_STEP_SUMMARY | |
cat README.md >> $GITHUB_STEP_SUMMARY | |
- name: Display Summary | |
run: cat $GITHUB_STEP_SUMMARY | |
- name: Commit | |
run: | | |
git config --local user.email "kittylinter@github.com" | |
git config --local user.name "Kitty Linter" | |
git add README.md | |
git commit -m "Update README with gameserver check summary" || echo "No changes to commit" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.WORKFLOW_TOKEN }} | |
repository: Kitty-Shackleford/tsb | |
force_with_lease: true |