Skip to content

Run Weekly Report Field Mapping Tasking Manger #4

Run Weekly Report Field Mapping Tasking Manger

Run Weekly Report Field Mapping Tasking Manger #4

Workflow file for this run

name: Run Weekly Report Field Mapping Tasking Manger
on:
schedule:
- cron: "0 0 * * MON" # Run every Monday at 0 UTC
# push:
# branches:
# - master
jobs:
issue:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.11
- name: Install Osmium
run: sudo apt-get install -y osmium-tool
- name: Install necessary dependecies
run: |
pip install flare-floss
python setup.py install
pip install tweepy
pip install -r requirements.txt
- name: Generate weekly Hashtag Stats
env: #assign variables
OSM_USERNAME: ${{ secrets.OSM_USERNAME }}
OSM_PASSWORD: ${{ secrets.OSM_PASSWORD }}
run: |
osmsg --format csv image --name stats --tags amenity --all_tags --charts --summary --update --name stats/fmtm/Weekly/stats --force --hashtags fmtm --temp
- name: add stats to git
continue-on-error: true
run: |
git pull
git config --global user.email "[email protected]"
git config --global user.name "kshitijrajsharma"
base_dir=stats/fmtm/Weekly
mkdir -p $base_dir
mv $base_dir/stats_summary.md $base_dir/Readme.md
git add -f $base_dir/*
git commit -m "Updated Weekly fmtm stats"
git push
# - name : Tweet stats
# env: #assign variables
# API_KEY: ${{ secrets.API_KEY }}
# API_KEY_SECRET: ${{ secrets.API_KEY_SECRET }}
# ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }}
# BEARER_TOKEN: ${{ secrets.BEARER_TOKEN }}
# run : |
# commit_id=$(git rev-parse --short HEAD)
# python tweet.py --git $commit_id --tweet '#fieldmappers' --name stats/fieldmappers/Daily/stats