feat: Add CD
This commit is contained in:
parent
a8ecf5fc1a
commit
d6c9245ed5
22
.drone.yml
Normal file
22
.drone.yml
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: CI
|
||||
|
||||
steps:
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username: phundrak
|
||||
password:
|
||||
from_secret: dh_key
|
||||
repo: phundrak/pleroma
|
||||
tags:
|
||||
- latest
|
||||
platform: linux/amd64
|
||||
build_args: |
|
||||
buildx_argv=(
|
||||
--pull
|
||||
--platform amd64
|
||||
--tag "phundrak/pleroma:latest"
|
||||
)
|
10
Dockerfile
10
Dockerfile
@ -6,17 +6,17 @@ RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends unzip
|
||||
|
||||
# docker buildx will fill this in
|
||||
ARG TARGETARCH
|
||||
ARG TARGETARCH
|
||||
|
||||
# Clone the release build into a temporary directory and unpack it
|
||||
# We use ADD here to bust the cache if the pleroma release changes
|
||||
# We use a separate layer for extraction so we don't end up with junk
|
||||
# from ADD left over in the final image.
|
||||
ADD https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=${TARGETARCH} /tmp/pleroma.zip
|
||||
ADD https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=amd64 /tmp/pleroma.zip
|
||||
|
||||
RUN mkdir -p /opt/pleroma-${TARGETARCH} && \
|
||||
RUN mkdir -p /opt/pleroma-amd64 && \
|
||||
unzip /tmp/pleroma.zip -d /tmp/ && \
|
||||
mv /tmp/release/* /opt/pleroma-${TARGETARCH}
|
||||
mv /tmp/release/* /opt/pleroma-amd64
|
||||
|
||||
# Ok, really build the container now
|
||||
FROM ubuntu:20.04 AS pleroma
|
||||
@ -43,7 +43,7 @@ RUN mkdir -p /etc/pleroma /var/lib/pleroma/static /var/lib/pleroma/uploads && \
|
||||
|
||||
ARG TARGETARCH
|
||||
|
||||
COPY --chown=pleroma:pleroma --from=unzip /opt/pleroma-${TARGETARCH}/ /opt/pleroma/
|
||||
COPY --chown=pleroma:pleroma --from=unzip /opt/pleroma-amd64/ /opt/pleroma/
|
||||
|
||||
VOLUME [ "/etc/pleroma", "/var/lib/pleroma/uploads", "/var/lib/pleroma/static" ]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user