Added support for building image based on tag.
This commit is contained in:
parent
f4c44bb039
commit
90b64c2e68
2 changed files with 36 additions and 5 deletions
32
.drone.yml
32
.drone.yml
|
|
@ -4,7 +4,7 @@ type: docker
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: docker
|
- name: build
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.thegibsonhome.net
|
registry: registry.thegibsonhome.net
|
||||||
|
|
@ -13,4 +13,32 @@ steps:
|
||||||
password:
|
password:
|
||||||
from_secret: registry_password
|
from_secret: registry_password
|
||||||
repo: registry.thegibsonhome.net/protonmail-bridge
|
repo: registry.thegibsonhome.net/protonmail-bridge
|
||||||
autotag: true
|
tags:
|
||||||
|
- latest
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: tag
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: plugins/docker
|
||||||
|
environment:
|
||||||
|
TAG: ${DRONE_TAG}
|
||||||
|
settings:
|
||||||
|
registry: registry.thegibsonhome.net
|
||||||
|
username:
|
||||||
|
from_secret: registry_username
|
||||||
|
password:
|
||||||
|
from_secret: registry_password
|
||||||
|
repo: registry.thegibsonhome.net/protonmail-bridge
|
||||||
|
tags: ${DRONE_COMMIT}
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
@ -8,9 +8,12 @@ RUN apk add --no-cache \
|
||||||
make \
|
make \
|
||||||
musl-dev
|
musl-dev
|
||||||
WORKDIR /usr/src
|
WORKDIR /usr/src
|
||||||
RUN git clone https://github.com/ProtonMail/proton-bridge.git proton-bridge
|
|
||||||
WORKDIR /usr/src/proton-bridge
|
ARG TAG
|
||||||
RUN make build-nogui
|
RUN git clone https://github.com/ProtonMail/proton-bridge.git proton-bridge \
|
||||||
|
&& cd proton-bridge \
|
||||||
|
&& if [ -n "$TAG" ]; then git checkout tags/$TAG; fi \
|
||||||
|
&& make build-nogui
|
||||||
|
|
||||||
# Create a container for the ProtonMail Bridge.
|
# Create a container for the ProtonMail Bridge.
|
||||||
FROM alpine:edge
|
FROM alpine:edge
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue