2 Commits
0.0.4 ... 0.0.6

Author SHA1 Message Date
2134eed508 Fix mastobot embed url
All checks were successful
Build & Release / build-docker-image (push) Successful in 1m29s
Build & Release / deploy-to-production (push) Successful in 6s
2026-02-18 18:33:38 +01:00
0ebb992280 Rename image
Some checks failed
Build & Release / build-docker-image (push) Successful in 1m24s
Build & Release / deploy-to-production (push) Failing after 5s
2026-02-17 15:02:25 +01:00
2 changed files with 10 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ on:
env: env:
ENDPOINT: services-3 ENDPOINT: services-3
STACK: mastodon STACK: mastodon
IMAGE: com.devsoap/mastobot IMAGE: mastodon/mastobot
TAG: ${{ gitea.ref_name }} TAG: ${{ gitea.ref_name }}
CACHE_NAME: cache-python-dependencies-mastobot CACHE_NAME: cache-python-dependencies-mastobot
RUNNER_TOOL_CACHE: /toolcache RUNNER_TOOL_CACHE: /toolcache
@@ -37,7 +37,7 @@ jobs:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
push: true push: true
build-args: | build-arg: |
VERSION=${{env.TAG}} VERSION=${{env.TAG}}
tags: | tags: |
${{secrets.DOCKER_REGISTRY}}/${{env.IMAGE}}:${{env.TAG}} ${{secrets.DOCKER_REGISTRY}}/${{env.IMAGE}}:${{env.TAG}}

View File

@@ -18,10 +18,15 @@ logger = logging.getLogger(__name__)
@router.get("/generate", summary="Embeddable Mastodon Feed") @router.get("/generate", summary="Embeddable Mastodon Feed")
async def generate_static_page(settings: Annotated[Settings, Depends(get_settings)]): 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_bucket = settings.feeds['embed']['s3_bucket']
s3_filename = settings.feeds['embed']['s3_key'] s3_filename = settings.feeds['embed']['s3_key']
mastodon_get_statuses_url=settings.feeds['embed']['url']
try: try:
latest_statuses = load_latest_statuses(mastodon_get_statuses_url, mastodon_token, 20) 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] latest_statuses = [status for status in latest_statuses if status['in_reply_to_id'] == None]