FediFetcher/.github/workflows/get_context.yml
2023-04-03 08:36:09 +01:00

46 lines
2.1 KiB
YAML

name: getAllRepliesToKnownPosts
concurrency: get_context
on:
workflow_dispatch:
schedule:
- cron: '3,13,23,33,43,53 * * * *'
jobs:
run:
runs-on: ubuntu-latest
environment: mastodon
steps:
- name: Checkout original repository
uses: actions/checkout@v3
with:
repository: nanos/FediFetcher
fetch-depth: 0
- name: Checkout latest release tag
run: git checkout $(git describe --tags)
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements.txt
- name: Download all workflow run artifacts
uses: dawidd6/action-download-artifact@v2
with:
name: artifacts
workflow: get_context.yml
if_no_artifact_found: warn
path: artifacts
- name: Get Directory structure
run: ls -lR
- run: python find_posts.py --lock-hours=0 --access-token=${{ secrets.ACCESS_TOKEN }} --server=${{ vars.MASTODON_SERVER }} --reply-interval-in-hours=${{ vars.REPLY_INTERVAL_IN_HOURS || 0 }} --home-timeline-length=${{ vars.HOME_TIMELINE_LENGTH || 0 }} --max-followings=${{ vars.MAX_FOLLOWINGS || 0 }} --user=${{ vars.USER }} --max-followers=${{ vars.MAX_FOLLOWERS || 0 }} --http-timeout=${{ vars.HTTP_TIMEOUT || 5 }} --max-follow-requests=${{ vars.MAX_FOLLOW_REQUESTS || 0 }} --on-fail=${{ vars.ON_FAIL }} --on-start=${{ vars.ON_START }} --on-done=${{ vars.ON_DONE }} --max-bookmarks=${{ vars.MAX_BOOKMARKS || 0 }} --remember-users-for-hours=${{ vars.REMEMBER_USERS_FOR_HOURS || 168 }} --from-notifications=${{ vars.FROM_NOTIFICATIONS || 0 }} --backfill-with-context=${{ vars.BACKFILL_WITH_CONTEXT || 1 }} --backfill-mentioned-users=${{ vars.BACKFILL_MENTIONED_USERS || 1 }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
artifacts
- name: Checkout user's forked repository for keeping workflow alive
uses: actions/checkout@v3
- name: Keep workflow alive
uses: gautamkrishnar/keepalive-workflow@v1