2023-03-16 05:17:34 +01:00
|
|
|
name: getAllRepliesToKnownPosts
|
2023-03-07 12:37:30 +01:00
|
|
|
concurrency: get_context
|
2023-03-06 13:42:15 +01:00
|
|
|
|
|
|
|
on:
|
2023-03-06 16:31:13 +01:00
|
|
|
workflow_dispatch:
|
2023-03-06 16:29:22 +01:00
|
|
|
schedule:
|
2023-03-06 17:24:08 +01:00
|
|
|
- cron: '3,13,23,33,43,53 * * * *'
|
2023-03-07 12:37:30 +01:00
|
|
|
|
2023-03-06 13:42:15 +01:00
|
|
|
jobs:
|
|
|
|
run:
|
|
|
|
runs-on: ubuntu-latest
|
2023-03-06 16:27:45 +01:00
|
|
|
environment: mastodon
|
2023-03-06 13:42:15 +01:00
|
|
|
steps:
|
2023-03-23 19:26:48 +01:00
|
|
|
- name: Checkout original repository
|
2024-01-26 16:52:45 +01:00
|
|
|
uses: actions/checkout@v4
|
2023-03-23 14:11:27 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-03-09 10:57:58 +01:00
|
|
|
- name: Set up Python
|
2024-01-26 16:52:45 +01:00
|
|
|
uses: actions/setup-python@v5
|
2023-03-06 13:47:24 +01:00
|
|
|
with:
|
2023-03-23 14:11:27 +01:00
|
|
|
python-version: '3.10'
|
2023-03-06 14:01:09 +01:00
|
|
|
cache: 'pip' # caching pip dependencies
|
2023-03-06 14:00:24 +01:00
|
|
|
- run: pip install -r requirements.txt
|
2023-03-06 13:42:15 +01:00
|
|
|
- name: Download all workflow run artifacts
|
2024-01-26 16:52:45 +01:00
|
|
|
uses: dawidd6/action-download-artifact@v3
|
2023-03-23 14:11:27 +01:00
|
|
|
with:
|
2023-03-06 13:42:15 +01:00
|
|
|
name: artifacts
|
2023-03-06 14:20:06 +01:00
|
|
|
workflow: get_context.yml
|
|
|
|
if_no_artifact_found: warn
|
2023-03-06 14:23:44 +01:00
|
|
|
path: artifacts
|
2023-03-09 10:57:58 +01:00
|
|
|
- name: Get Directory structure
|
|
|
|
run: ls -lR
|
2023-06-15 12:12:18 +02:00
|
|
|
- run: python find_posts.py --lock-hours=0 --access-token=${{ secrets.ACCESS_TOKEN }} -c="./config.json"
|
2023-03-06 13:42:15 +01:00
|
|
|
- name: Upload artifacts
|
2024-01-26 17:31:22 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-03-06 13:42:15 +01:00
|
|
|
with:
|
|
|
|
name: artifacts
|
|
|
|
path: |
|
2023-03-06 13:49:56 +01:00
|
|
|
artifacts
|
2023-03-23 19:26:48 +01:00
|
|
|
- name: Checkout user's forked repository for keeping workflow alive
|
|
|
|
uses: actions/checkout@v3
|
2023-03-23 08:06:14 +01:00
|
|
|
- name: Keep workflow alive
|
2024-01-26 16:52:45 +01:00
|
|
|
uses: gautamkrishnar/keepalive-workflow@v1
|