add .drone.yml
continuous-integration/drone/tag Build is failing Details

This commit is contained in:
Dawid Wysokiński 2022-09-25 13:36:12 +02:00
parent 922628cdd4
commit ff372f7aca
Signed by: Kichiyaki
GPG Key ID: B5445E357FB8B892
2 changed files with 74 additions and 0 deletions

59
.drone.yml Normal file
View File

@ -0,0 +1,59 @@
---
kind: pipeline
type: docker
name: linux-amd64
platform:
os: linux
arch: amd64
steps:
- name: publish
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
registry: gitea.dwysokinski.me
repo: gitea.dwysokinski.me/zdam-egzamin-zawodowy-docker/admin-panel
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: Dockerfile
trigger:
event:
- tag
---
kind: pipeline
type: docker
name: manifest
steps:
- name: manifest
image: plugins/manifest
settings:
auto_tag: "true"
ignore_missing: "true"
spec: manifest.tmpl
username:
from_secret: docker_username
password:
from_secret: docker_password
- name: manifest-latest
image: plugins/manifest
settings:
tags: latest
ignore_missing: "true"
spec: manifest.tmpl
username:
from_secret: docker_username
password:
from_secret: docker_password
trigger:
event:
- tag
depends_on:
- linux-amd64

15
manifest.tmpl Normal file
View File

@ -0,0 +1,15 @@
414 B
image: gitea.dwysokinski.me/zdam-egzamin-zawodowy-docker/admin-panel:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
-
image: gitea.dwysokinski.me/zdam-egzamin-zawodowy-docker/admin-panel:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform:
architecture: amd64
os: linux