Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sefinek committed Sep 8, 2024
1 parent 935b755 commit 5df1afe
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/fetch-ips.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Fetch IPs

on:
schedule: # https://crontab.guru
- cron: '0 */2 * * *' # At minute 0 past every 2nd hour.

schedule:
- cron: '0 */2 * * *' # Co 2 godziny
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -34,13 +33,15 @@ jobs:
id: check_changes
run: |
git status -s > changes.txt
echo "::set-output name=has_changes::$(cat changes.txt | wc -l)"
echo "has_changes=$(cat changes.txt | wc -l)" >> $GITHUB_ENV
- name: Commit and push changes if necessary
if: steps.check_changes.outputs.has_changes != '0'
if: env.has_changes != '0'
run: |
git config user.name "Sefinek Actions"
git config user.email "[email protected]"
git add .
git commit -am "Update the list of malicious IP addresses"
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_SECRET }}

0 comments on commit 5df1afe

Please sign in to comment.