continuous-integration/drone/push Build is failing
- Replace bash substring syntax ${DRONE_COMMIT_SHA:0:7} with
${DRONE_COMMIT_SHA} which is supported by Drone YAML variables
- Use 'adduser -D -g ""' in Dockerfile to skip interactive prompts
for user information during Docker image build
35 lines
662 B
YAML
35 lines
662 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: build-and-push
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
- pull_request
|
|
|
|
steps:
|
|
- name: build-test
|
|
image: plugins/docker
|
|
settings:
|
|
dockerfile: Dockerfile
|
|
context: .
|
|
when:
|
|
event:
|
|
- pull_request
|
|
|
|
- name: build-and-push
|
|
image: plugins/docker
|
|
settings:
|
|
dockerfile: Dockerfile
|
|
context: .
|
|
registry: gitea.jambotron.com
|
|
repo: gitea.jambotron.com/liosha84/htop-web
|
|
tags: ${DRONE_COMMIT_SHA},main-latest
|
|
username:
|
|
from_secret: REGISTRY_USERNAME
|
|
password:
|
|
from_secret: REGISTRY_PASSWORD
|
|
when:
|
|
branch:
|
|
- main
|