Skip to content

Process XML and Generate Results #36

Process XML and Generate Results

Process XML and Generate Results #36

Workflow file for this run

name: Process XML and Generate Results
on:
push:
branches:
- main
schedule:
- cron: '0 0 * * *' # This line schedules the workflow to run every day at midnight
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Download XML
run: |
curl -O https://www.treasury.gov/ofac/downloads/sanctions/1.0/sdn_advanced.xml
- name: Create output directory
run: |
mkdir -p Sanctioned\ Addresses
- name: Run Python script
run: |
python process_xml.py ETH -f TXT -path ./Sanctioned\ Addresses
- name: Commit and push if it changed
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git diff --quiet && git diff --staged --quiet || (git commit -m "Update data"; git push)