Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/update-version-number.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,15 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Work out the image tags
- name: Work out the image tags, version and revision
id: tags
env:
REF: ${{ github.ref_name }}
IMAGE: ghcr.io/${{ github.repository_owner }}/fedifetcher
run: |
echo "version=${REF#v}" >> "$GITHUB_OUTPUT"
# not github.sha: `run` may have moved the tag onto its version bump commit
echo "revision=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
{
echo "tags<<EOF"
echo "$IMAGE:$REF"
Expand All @@ -81,3 +84,6 @@ jobs:
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.tags.outputs.tags }}
build-args: |
VERSION=${{ steps.tags.outputs.version }}
REVISION=${{ steps.tags.outputs.revision }}
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
FROM python:3.14-alpine
LABEL org.opencontainers.image.source=https://github.com/nanos/FediFetcher \
org.opencontainers.image.description="Pull missing posts into Mastodon" \
org.opencontainers.image.licenses=MIT
WORKDIR /app
COPY ./requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
RUN mkdir -p /app/artifacts/
COPY ./find_posts.py /app/
COPY ./fedifetcher /app/fedifetcher
ARG VERSION=dev
ARG REVISION=unknown
LABEL org.opencontainers.image.version=$VERSION \
org.opencontainers.image.revision=$REVISION
ENTRYPOINT ["python", "find_posts.py"]
Loading