fix syntax

This commit is contained in:
Brendan McDevitt 2025-04-17 09:59:18 -05:00
parent 94943274f1
commit fbc55dab26

View file

@ -11,12 +11,12 @@ jobs:
update-incidents:
runs-on: ubuntu-latest
container:
image: node:18
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
server-url: 'https://git.mcdevitt.tech'
image: node:18
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
server-url: 'https://git.mcdevitt.tech'
repository: 'bpmcdevitt/madison_police_incident_report_collector'
- name: Setup SSH
@ -27,46 +27,46 @@ jobs:
ssh-keyscan -p 3022 git.mcdevitt.tech >> ~/.ssh/known_hosts
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests feedparser beautifulsoup4
- name: Run incident parser script
run: |
python madison_police_incidents.py
- name: Configure Git
run: |
git config --local user.email "action@git.mcdevitt.tech"
git config --local user.name "Git Action"
- name: Check for changes
id: check_changes
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "has_changes=true" >> $GITHUB_OUTPUT
else
echo "has_changes=false" >> $GITHUB_OUTPUT
fi
- name: Commit and push if there are changes
if: steps.check_changes.outputs.has_changes == 'true'
run: |
# Get current date for commit message
CURRENT_DATE=$(date '+%Y-%m-%d')
# Add all changes
git add incidents/
# Commit with date in message
git commit -m "Update incident reports: $CURRENT_DATE"
# Push changes
git push
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests feedparser beautifulsoup4
- name: Run incident parser script
run: |
python madison_police_incidents.py
- name: Configure Git
run: |
git config --local user.email "action@git.mcdevitt.tech"
git config --local user.name "Git Action"
- name: Check for changes
id: check_changes
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "has_changes=true" >> $GITHUB_OUTPUT
else
echo "has_changes=false" >> $GITHUB_OUTPUT
fi
- name: Commit and push if there are changes
if: steps.check_changes.outputs.has_changes == 'true'
run: |
# Get current date for commit message
CURRENT_DATE=$(date '+%Y-%m-%d')
# Add all changes
git add incidents/
# Commit with date in message
git commit -m "Update incident reports: $CURRENT_DATE"
# Push changes
git push