Check API Availability #1005
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: Check API Availability | |
on: | |
schedule: | |
- cron: '0 */8 * * *' # Runs every 8 hours | |
jobs: | |
check-api: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Check API Status | |
run: | | |
API_URL="https://api.nc-elki.v6.army" | |
if curl --output /dev/null --silent --head --fail "$API_URL"; then | |
echo "API is running" | |
else | |
echo "API is not running" | |
exit 1 | |
fi |