FediFetcher/.github/workflows/get_context.yml
2023-03-13 12:36:00 +00:00

41 lines
1.3 KiB
YAML

name: getAllRepliesToKnownPots
concurrency: get_context
on:
workflow_dispatch:
schedule:
- cron: '3,13,23,33,43,53 * * * *'
jobs:
run:
runs-on: ubuntu-latest
environment: mastodon
steps:
- name: Get latest release
run: |
curl -s https://api.github.com/repos/nanos/mastodon_get_replies/releases/latest | jq .zipball_url | xargs wget -O download.zip
unzip -j download.zip
mkdir artifacts
ls -lR
- 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 get_context.py ${{ secrets.ACCESS_TOKEN }} ${{ vars.MASTODON_SERVER }} ${{ vars.REPLY_INTERVAL_IN_HOURS }} ${{ vars.HOME_TIMELINE_LENGTH }} ${{ vars.MAX_FOLLOWINGS }} ${{ vars.USER }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
artifacts