mirror of
https://github.com/KevinMidboe/planetposen-mail.git
synced 2025-10-28 17:20:32 +00:00
Drone CI: Build and publish (#1)
* Build and publish to ghcr with drone CI * Sign drone config file * Updated build step name * Allow publish on this branch for testing * Try set image source label to ghcr * Update label image source structure * Remove git suffix of container source * Remove ci branch from allowed publish branches
This commit is contained in:
40
.drone.yml
Normal file
40
.drone.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: Build and publish
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: golang
|
||||
commands:
|
||||
- make build
|
||||
|
||||
- name: Build and publish docker image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: ghcr.io
|
||||
repo: ghcr.io/kevinmidboe/planetposen-mail
|
||||
dockerfile: Dockerfile
|
||||
username:
|
||||
from_secret: GITHUB_USERNAME
|
||||
password:
|
||||
from_secret: GITHUB_PASSWORD
|
||||
tags: latest
|
||||
when:
|
||||
event:
|
||||
include:
|
||||
- push
|
||||
exclude:
|
||||
- pull_request
|
||||
branch:
|
||||
- master
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 92fdb188c7743e4b3c82a5cb8167abb86ab65508e03bf76273e1193692b439aa
|
||||
|
||||
...
|
||||
@@ -1,6 +1,8 @@
|
||||
# Build the project
|
||||
FROM golang:1.19 as builder
|
||||
|
||||
LABEL org.opencontainers.image.source="https://github.com/KevinMidboe/planetposen-mail"
|
||||
|
||||
WORKDIR /go/src/github.com/kevinmidboe/planetposen-mail
|
||||
ADD . .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user