Update ip-ranges.json #1875
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: Update ip-ranges.json | |
# Run on schedule | |
on: | |
schedule: | |
- cron: '00 3 * * *' | |
workflow_dispatch: | |
# Jobs | |
jobs: | |
update: | |
name: Update | |
runs-on: ubuntu-latest | |
# Steps | |
steps: | |
# Inspect Github context | |
- name: Inspect Github context | |
run: | | |
echo "The github context is:" | |
echo "${{ toJson(github) }}" | |
# Checkout | |
- name: Checkout | |
uses: actions/checkout@main | |
# Download | |
- name: Download from source (https://ip-ranges.amazonaws.com/ip-ranges.json) | |
run: curl --connect-timeout 60 --retry 3 --retry-delay 15 --show-error --compressed -v -o ./ip-ranges.json https://ip-ranges.amazonaws.com/ip-ranges.json | |
# Set commit vars | |
- name: Set commit vars | |
run: | | |
echo "COMMIT_MESSAGE=Robot updated $(date +%c)" >> $GITHUB_ENV | |
# Commit and Push | |
- name: Commit and push changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_user_name: jensihnow | |
commit_user_email: [email protected] | |
commit_message: ${{ env.COMMIT_MESSAGE }} |