jlelse
/
docker-hugo
Archived
1
Fork 0

Update and use drone CI

This commit is contained in:
Jan-Lukas Else 2020-04-27 16:48:02 +02:00
parent ceba686af9
commit c802259446
2 changed files with 29 additions and 13 deletions

24
.drone.yml Normal file
View File

@ -0,0 +1,24 @@
kind: pipeline
name: default
platform:
os: linux
arch: amd64
steps:
- name: publish
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: quay.io/jlelse/hugo
registry: quay.io
auto_tag: true
when:
branch:
- master
event:
exclude:
- pull_request

View File

@ -1,25 +1,17 @@
FROM golang:1.14-alpine AS build FROM golang:1.14-alpine3.11 AS build
RUN echo "" > /etc/apk/repositories && \ RUN apk add -X http://ftp.halifax.rwth-aachen.de/alpine/latest-stable/main/ -X http://ftp.halifax.rwth-aachen.de/alpine/latest-stable/community/ --no-cache gcc g++ musl-dev git
echo "http://ftp.halifax.rwth-aachen.de/alpine/latest-stable/main/" >> /etc/apk/repositories && \
echo "http://ftp.halifax.rwth-aachen.de/alpine/latest-stable/community/" >> /etc/apk/repositories && \
apk update && \
apk --no-cache add --no-cache gcc g++ musl-dev git
WORKDIR /hugo WORKDIR /hugo
RUN git clone --branch v0.68.3 https://github.com/gohugoio/hugo.git . RUN git clone --branch v0.69.2 https://github.com/gohugoio/hugo.git .
RUN go build -v --tags extended RUN go build -v --tags extended
FROM golang:1.14-alpine FROM alpine:3.11
COPY --from=build /hugo/hugo /usr/bin/hugo COPY --from=build /hugo/hugo /usr/bin/hugo
RUN echo "" > /etc/apk/repositories && \ RUN apk add -X http://ftp.halifax.rwth-aachen.de/alpine/latest-stable/main/ -X http://ftp.halifax.rwth-aachen.de/alpine/latest-stable/community/ --no-cache ca-certificates libc6-compat libstdc++ git go
echo "http://ftp.halifax.rwth-aachen.de/alpine/latest-stable/main/" >> /etc/apk/repositories && \
echo "http://ftp.halifax.rwth-aachen.de/alpine/latest-stable/community/" >> /etc/apk/repositories && \
apk update && \
apk --no-cache add --no-cache ca-certificates libc6-compat libstdc++ git
VOLUME /site VOLUME /site
WORKDIR /site WORKDIR /site