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