just make sure the tools are installed
This commit is contained in:
parent
6f9f839925
commit
d7c48d31dd
@ -1,11 +1,26 @@
|
||||
FROM docker.io/golang:1.21-alpine3.19 AS builder
|
||||
|
||||
RUN apk --no-cache add \
|
||||
git
|
||||
|
||||
ADD md2gmi.go /md2gmi.go
|
||||
RUN go build -o /md2gmi /md2gmi.go
|
||||
|
||||
ENV HUGO_VERSION=v0.121.1
|
||||
RUN git clone https://github.com/gohugoio/hugo.git /src/hugo
|
||||
WORKDIR /src/hugo
|
||||
|
||||
FROM scratch
|
||||
RUN git checkout $HUGO_VERSION
|
||||
RUN go build -o /hugo
|
||||
|
||||
COPY --from=builder /md2gmi /md2gmi
|
||||
FROM docker.io/alpine:3.19
|
||||
|
||||
ENTRYPOINT ["/md2gmi"]
|
||||
COPY --from=builder /md2gmi /bin/md2gmi
|
||||
COPY --from=builder /hugo /bin/hugo
|
||||
|
||||
RUN apk --no-cache add \
|
||||
make
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
15
action.yml
15
action.yml
@ -1,15 +1,10 @@
|
||||
name: "Markdown2Gemini"
|
||||
description: "Simple conversion of a tree of markdown files to the gemini format."
|
||||
name: "Hugo Builder"
|
||||
description: "Build a hugo website from a makefile (runs 'make all' (md2gemini is included)"
|
||||
inputs:
|
||||
input-dir:
|
||||
description: "Path to the input directory"
|
||||
required: true
|
||||
output-dir:
|
||||
description: "Path to the output directory"
|
||||
working-dir:
|
||||
description: "Working directory"
|
||||
required: true
|
||||
default: "."
|
||||
runs:
|
||||
using: "docker"
|
||||
image: "Containerfile"
|
||||
args:
|
||||
- ${{ inputs.input-dir }}
|
||||
- ${{ inputs.output-dir }}
|
||||
|
8
entrypoint.sh
Normal file
8
entrypoint.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ -n "$INPUT_WORKING_DIR" ]; then
|
||||
cd "$INPUT_WORKING_DIR"
|
||||
fi
|
||||
|
||||
make all
|
Loading…
Reference in New Issue
Block a user