Skip to content

feat: Add reader settings and theming #54

feat: Add reader settings and theming

feat: Add reader settings and theming #54

Workflow file for this run

name: Build & Push Docker Image
on:
push:
branches:
- main
release:
types: [published]
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Decide Docker image tags
id: meta
run: |
IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/delb
TAGS="${IMAGE_NAME}:twilight"
if [ "${{ github.event_name }}" = "release" ]; then
TAGS="${TAGS},${IMAGE_NAME}:stable"
TAGS="${TAGS},${IMAGE_NAME}:${GITHUB_REF##*/}"
fi
echo "tags=$TAGS" >> $GITHUB_OUTPUT
- name: Get release version from git
id: get_version
run: |
if git describe --tags --abbrev=0 >/dev/null 2>&1; then
VERSION=$(git describe --tags --dirty --always)
elif git rev-parse --short HEAD >/dev/null 2>&1; then
VERSION=$(git rev-parse --short HEAD)
else
VERSION="manual"
fi
echo "NUXT_PUBLIC_APP_VERSION=$VERSION" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
NUXT_PUBLIC_APP_VERSION=${{ env.NUXT_PUBLIC_APP_VERSION }}