Skip to content

Commit 799cea6

Browse files
committed
Use libreoffice base image
1 parent 97052e0 commit 799cea6

3 files changed

Lines changed: 41 additions & 0 deletions

File tree

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Container image that runs your code
2+
FROM lscr.io/linuxserver/libreoffice:latest
3+
4+
RUN apk add --no-cache msttcorefonts-installer fontconfig wget
5+
RUN update-ms-fonts
6+
7+
RUN mkdir -p "/usr/local/share/fonts/Microsoft/TrueType/Segoe UI/" && \
8+
wget -q https://github.com/mrbvrz/segoe-ui/raw/master/font/segoeui.ttf?raw=true -O "/usr/local/share/fonts/Microsoft/TrueType/Segoe UI/segoeui.ttf" && \
9+
wget -q https://github.com/mrbvrz/segoe-ui/raw/master/font/segoeuib.ttf?raw=true -O "/usr/local/share/fonts/Microsoft/TrueType/Segoe UI/segoeuib.ttf" && \
10+
wget -q https://github.com/mrbvrz/segoe-ui/raw/master/font/segoeuii.ttf?raw=true -O "/usr/local/share/fonts/Microsoft/TrueType/Segoe UI/segoeuii.ttf" && \
11+
wget -q https://github.com/mrbvrz/segoe-ui/raw/master/font/segoeuiz.ttf?raw=true -O "/usr/local/share/fonts/Microsoft/TrueType/Segoe UI/segoeuiz.ttf" && \
12+
wget -q https://github.com/mrbvrz/segoe-ui/raw/master/font/segoeuil.ttf?raw=true -O "/usr/local/share/fonts/Microsoft/TrueType/Segoe UI/segoeuil.ttf" && \
13+
wget -q https://github.com/mrbvrz/segoe-ui/raw/master/font/seguili.ttf?raw=true -O "/usr/local/share/fonts/Microsoft/TrueType/Segoe UI/seguili.ttf" && \
14+
wget -q https://github.com/mrbvrz/segoe-ui/raw/master/font/segoeuisl.ttf?raw=true -O "/usr/local/share/fonts/Microsoft/TrueType/Segoe UI/segoeuisl.ttf" && \
15+
wget -q https://github.com/mrbvrz/segoe-ui/raw/master/font/seguisli.ttf?raw=true -O "/usr/local/share/fonts/Microsoft/TrueType/Segoe UI/seguisli.ttf" && \
16+
wget -q https://github.com/mrbvrz/segoe-ui/raw/master/font/seguisb.ttf?raw=true -O "/usr/local/share/fonts/Microsoft/TrueType/Segoe UI/seguisb.ttf" && \
17+
wget -q https://github.com/mrbvrz/segoe-ui/raw/master/font/seguisbi.ttf?raw=true -O "/usr/local/share/fonts/Microsoft/TrueType/Segoe UI/seguisbi.ttf" && \
18+
fc-cache -f "/usr/local/share/fonts/Microsoft/TrueType/Segoe UI"
19+
20+
# Copies your code file from your action repository to the filesystem path `/` of the container
21+
COPY entrypoint.sh /entrypoint.sh
22+
# Code file to execute when the docker container starts up (`entrypoint.sh`)
23+
ENTRYPOINT ["/entrypoint.sh"]

action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# action.yml
2+
name: 'Libreoffice Convert'
3+
description: 'Run libreoffice in headless mode'
4+
inputs:
5+
command: # id of input
6+
description: 'The command to run'
7+
required: true
8+
default: 'libreoffice --headless --invisible --version'
9+
runs:
10+
using: 'docker'
11+
image: 'Dockerfile'
12+
args:
13+
- ${{ inputs.command }}

entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh -l
2+
3+
sh -c "$1"
4+
time=$(date)
5+
echo "::set-output name=time::$time"

0 commit comments

Comments
 (0)