4 Commits

Author SHA1 Message Date
nkanaev
da569b3321 bump version 2025-03-26 14:42:39 +00:00
nkanaev
11285e4af0 update docker publish workflow 2025-03-26 14:42:15 +00:00
nkanaev
9fe02931d8 update dockerfiles 2025-03-26 14:33:23 +00:00
nkanaev
e4f9dc8c72 sanitize media description in html 2025-03-26 12:39:36 +00:00
5 changed files with 15 additions and 13 deletions

View File

@@ -1,10 +1,12 @@
name: Publish Docker Image name: Publish Docker Image
on: on:
push: push:
tags: [ 'v*.*.*', 'v*.*', 'v*', 'latest' ] tags:
- v*
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: nkanaev/yarr IMAGE_NAME: nkanaev/yarr
jobs: jobs:
build-and-push-image: build-and-push-image:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -13,10 +15,10 @@ jobs:
packages: write packages: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Log in to the Container registry - name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 uses: docker/login-action@v3
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
@@ -24,12 +26,12 @@ jobs:
- name: Extract Docker metadata - name: Extract Docker metadata
id: meta id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 uses: docker/metadata-action@v5
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a uses: docker/build-push-action@v6
with: with:
context: . context: .
file: ./etc/dockerfile file: ./etc/dockerfile

View File

@@ -1,13 +1,13 @@
FROM golang:alpine3.18 AS build FROM golang:alpine3.21 AS build
RUN apk add build-base git RUN apk add build-base git
WORKDIR /src WORKDIR /src
COPY . . COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/root/go/pkg \ RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/root/go/pkg \
make host make host
FROM alpine:latest FROM alpine:latest
RUN apk add --no-cache ca-certificates && \ RUN apk add --no-cache ca-certificates && update-ca-certificates
update-ca-certificates
COPY --from=build /src/out/yarr /usr/local/bin/yarr COPY --from=build /src/out/yarr /usr/local/bin/yarr
EXPOSE 7070 EXPOSE 7070
ENTRYPOINT ["/usr/local/bin/yarr"] ENTRYPOINT ["/usr/local/bin/yarr"]

View File

@@ -12,9 +12,9 @@ RUN env DEBIAN_FRONTEND=noninteractive \
apt install -y qemu-user qemu-user-static apt install -y qemu-user qemu-user-static
# Install Golang # Install Golang
RUN wget --quiet https://go.dev/dl/go1.18.2.linux-amd64.tar.gz && \ RUN wget --quiet https://go.dev/dl/go1.24.1.linux-amd64.tar.gz && \
rm -rf /usr/local/go && \ rm -rf /usr/local/go && \
tar -C /usr/local -xzf go1.18.2.linux-amd64.tar.gz tar -C /usr/local -xzf go1.24.1.linux-amd64.tar.gz
ENV PATH=$PATH:/usr/local/go/bin ENV PATH=$PATH:/usr/local/go/bin
# Copy source code # Copy source code

View File

@@ -1,4 +1,4 @@
VERSION=2.4 VERSION=2.5
GITHASH=$(shell git rev-parse --short=8 HEAD) GITHASH=$(shell git rev-parse --short=8 HEAD)
GO_TAGS = sqlite_foreign_keys sqlite_json GO_TAGS = sqlite_foreign_keys sqlite_json

View File

@@ -365,7 +365,7 @@
<div v-if="contentImages.length"> <div v-if="contentImages.length">
<figure v-for="media in contentImages"> <figure v-for="media in contentImages">
<img :src="media.url" loading="lazy"> <img :src="media.url" loading="lazy">
<figcaption v-if="media.description" v-html="media.description"></figcaption> <figcaption v-if="media.description">{{ media.description }}</figcaption>
</figure> </figure>
</div> </div>
<audio class="w-100" controls v-for="media in contentAudios" :src="media.url"></audio> <audio class="w-100" controls v-for="media in contentAudios" :src="media.url"></audio>