Add initial CI
Some checks failed
continuous-integration/drone Build is passing
continuous-integration/drone/tag Build is failing

This commit is contained in:
Aode (lion) 2021-12-21 10:38:54 -06:00
commit e258c0f5fc
4 changed files with 194 additions and 0 deletions

131
.drone.yml Normal file
View file

@ -0,0 +1,131 @@
kind: pipeline
type: docker
name: publish-amd64
platform:
arch: amd64
steps:
- name: push
image: plugins/docker:20
settings:
username: asonix
password:
from_secret: dockerhub_token
repo: asonix/conduit
dockerfile: Dockerfile
auto_tag: true
auto_tag_suffix: linux-amd64
build_args:
- REPO_ARCH=amd64
trigger:
event:
- tag
---
kind: pipeline
type: docker
name: publish-arm64v8
platform:
arch: amd64
steps:
- name: push
image: plugins/docker:20
settings:
username: asonix
password:
from_secret: dockerhub_token
repo: asonix/conduit
dockerfile: Dockerfile
auto_tag: true
auto_tag_suffix: linux-arm64v8
build_args:
- REPO_ARCH=arm64v8
trigger:
event:
- tag
---
kind: pipeline
type: docker
name: publish-arm32v7
platform:
arch: amd64
steps:
- name: push
image: plugins/docker:20
settings:
username: asonix
password:
from_secret: dockerhub_token
repo: asonix/conduit
dockerfile: Dockerfile
auto_tag: true
auto_tag_suffix: linux-arm32v7
build_args:
- REPO_ARCH=arm32v7
trigger:
event:
- tag
---
kind: pipeline
type: docker
name: manifest
platform:
arch: amd64
steps:
- name: manifest
image: plugins/manifest:1
settings:
username: asonix
password:
from_secret: dockerhub_token
dump: true
auto_tag: true
ignore_missing: true
spec: manifest.tmpl
depends_on:
- publish-amd64
- publish-arm64v8
- publish-arm32v7
trigger:
event:
- tag
---
kind: pipeline
type: docker
name: cron
steps:
- name: tag
image: asonix/release-checker:0.1
pull: always
environment:
GITEA_TOKEN:
from_secret: gitea_token
commands:
- /usr/local/bin/release-checker
trigger:
event:
- custom
- cron

14
Check.toml Normal file
View file

@ -0,0 +1,14 @@
[project]
kind = "alpine"
package = "synapse"
branch = "edge"
architectures = [
"x86_64",
"aarch64",
"armv7"
]
[gitea]
domain = "git.asonix.dog"
owner = "asonix"
repo = "docker-synapse"

30
Dockerfile Normal file
View file

@ -0,0 +1,30 @@
ARG REPO_ARCH
FROM ${REPO_ARCH}/alpine:edge
ENV UID=991
ENV GID=991
RUN \
mkdir /opt/synapse && \
addgroup --gid "$GID" synapse && \
adduser \
--disabled-password \
--gecos "" \
--home /opt/synapse \
--ingroup synapse \
--no-create-home \
--uid "$UID" \
synapse && \
chown -R synapse:synapse /opt/synapse && \
apk add synapse tini
EXPOSE 8008/tcp
VOLUME /media_store
USER synapse
WORKDIR /opt/synapse
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/usr/bin/synctl", "--no-daemonize", "start", "/etc/synapse/homeserver.yaml"]

19
manifest.tmpl Normal file
View file

@ -0,0 +1,19 @@
image: asonix/synapse:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
manifests:
-
image: asonix/synapse:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform:
architecture: amd64
os: linux
-
image: asonix/synapse:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64v8
platform:
architecture: arm64
os: linux
variant: v8
-
image: asonix/synapse:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm32v7
platform:
architecture: arm
os: linux
variant: v7