Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
aeeeebd3da
|
|||
|
2134eed508
|
|||
|
0ebb992280
|
|||
|
6758d1f0bf
|
@@ -7,7 +7,7 @@ on:
|
||||
env:
|
||||
ENDPOINT: services-3
|
||||
STACK: mastodon
|
||||
IMAGE: com.devsoap/mastobot
|
||||
IMAGE: mastodon/mastobot
|
||||
TAG: ${{ gitea.ref_name }}
|
||||
CACHE_NAME: cache-python-dependencies-mastobot
|
||||
RUNNER_TOOL_CACHE: /toolcache
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
build-docker-image:
|
||||
runs-on: node20
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-20.04
|
||||
image: catthehacker/ubuntu:act-24.04
|
||||
steps:
|
||||
- name: Checkout Docker file
|
||||
uses: actions/checkout@v4
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
|
||||
@@ -18,10 +18,15 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
@router.get("/generate", summary="Embeddable Mastodon Feed")
|
||||
async def generate_static_page(settings: Annotated[Settings, Depends(get_settings)]):
|
||||
mastodon_token = settings.feeds['embed']['token']
|
||||
|
||||
mastodon_server = settings.mastodon_server
|
||||
mastodon_aid = settings.feeds['embed']['account_id']
|
||||
mastodon_token = str(settings.feeds['embed']['token'])
|
||||
mastodon_get_statuses_url=f'{mastodon_server}/api/v1/accounts/{mastodon_aid}/statuses'
|
||||
|
||||
s3_bucket = settings.feeds['embed']['s3_bucket']
|
||||
s3_filename = settings.feeds['embed']['s3_key']
|
||||
mastodon_get_statuses_url=settings.feeds['embed']['url']
|
||||
|
||||
try:
|
||||
latest_statuses = load_latest_statuses(mastodon_get_statuses_url, mastodon_token, 20)
|
||||
latest_statuses = [status for status in latest_statuses if status['in_reply_to_id'] == None]
|
||||
|
||||
Reference in New Issue
Block a user