This commit is contained in:
parent
299b604170
commit
ef5aaef043
19
.drone.yml
19
.drone.yml
|
@ -6,6 +6,11 @@ platform:
|
|||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: extra-tags
|
||||
image: busybox:latest
|
||||
commands:
|
||||
- echo "$BASE_TAG-$GIT_BRANCH-linux-amd64,$GIT_BRANCH-linux-amd64" | sed 's/\//-/g' > .tags
|
||||
|
||||
- name: push
|
||||
image: plugins/docker:20
|
||||
settings:
|
||||
|
@ -20,7 +25,7 @@ steps:
|
|||
- REPO_ARCH=amd64
|
||||
- GIT_REPOSITORY=https://git.asonix.dog/asonix/mastodon
|
||||
build_args_from_env:
|
||||
- GIT_TAG
|
||||
- GIT_BRANCH
|
||||
|
||||
trigger:
|
||||
event:
|
||||
|
@ -36,6 +41,11 @@ platform:
|
|||
arch: arm64
|
||||
|
||||
steps:
|
||||
- name: extra-tags
|
||||
image: busybox:latest
|
||||
commands:
|
||||
- echo "$BASE_TAG-$GIT_BRANCH-linux-arm64v8,$GIT_BRANCH-linux-arm64v8" | sed 's/\//-/g' > .tags
|
||||
|
||||
- name: push
|
||||
image: plugins/docker:20
|
||||
settings:
|
||||
|
@ -50,7 +60,7 @@ steps:
|
|||
- REPO_ARCH=arm64v8
|
||||
- GIT_REPOSITORY=https://git.asonix.dog/asonix/mastodon
|
||||
build_args_from_env:
|
||||
- GIT_TAG
|
||||
- GIT_BRANCH
|
||||
|
||||
trigger:
|
||||
event:
|
||||
|
@ -66,6 +76,11 @@ platform:
|
|||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: extra-tags
|
||||
image: busybox:latest
|
||||
commands:
|
||||
- echo "$BASE_TAG-$GIT_BRANCH,$GIT_BRANCH" | sed 's/\//-/g' > .tags
|
||||
|
||||
- name: manifest
|
||||
image: plugins/manifest:1
|
||||
settings:
|
||||
|
|
|
@ -3,7 +3,7 @@ ARG REPO_ARCH
|
|||
FROM $REPO_ARCH/ruby:2.7-alpine3.15
|
||||
|
||||
# Set up git remote
|
||||
ARG GIT_TAG
|
||||
ARG GIT_BRANCH
|
||||
ARG GIT_REPOSITORY
|
||||
|
||||
# Tell rails to serve static files
|
||||
|
@ -33,7 +33,7 @@ RUN echo "Etc/UTC" > /etc/localtime && \
|
|||
|
||||
# Install mastodon
|
||||
USER mastodon
|
||||
RUN git clone -b ${GIT_TAG} ${GIT_REPOSITORY} /opt/mastodon && \
|
||||
RUN git clone -b ${GIT_BRANCH} ${GIT_REPOSITORY} /opt/mastodon && \
|
||||
rm -rf /opt/mastodon/.git
|
||||
|
||||
# Install dependencies
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
image: asonix/mastodon:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||
{{#if build.tags}}
|
||||
tags:
|
||||
{{#each build.tags}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
manifests:
|
||||
-
|
||||
image: asonix/mastodon:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||
|
|
Loading…
Reference in a new issue