77 lines
1.4 KiB
YAML
77 lines
1.4 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: figlet-http build
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
volumes:
|
|
- name: cache
|
|
host:
|
|
path: /tmp/cache
|
|
|
|
steps:
|
|
- name: Load cached node_modules packages
|
|
image: sinlead/drone-cache:1.0.0
|
|
settings:
|
|
action: load
|
|
key: yarn.lock
|
|
mount: node_modules
|
|
prefix: yarn-modules-figlet-http
|
|
volumes:
|
|
- name: cache
|
|
path: /cache
|
|
|
|
- name: Install
|
|
image: node:18.2.0
|
|
commands:
|
|
- node -v
|
|
- yarn --version
|
|
- yarn
|
|
|
|
- name: Cache node_modules packages
|
|
image: sinlead/drone-cache:1.0.0
|
|
settings:
|
|
action: save
|
|
key: yarn.lock
|
|
mount: node_modules
|
|
prefix: yarn-modules-figlet-http
|
|
volumes:
|
|
- name: cache
|
|
path: /cache
|
|
|
|
- name: Build ts
|
|
image: node:18.2.0
|
|
commands:
|
|
- yarn build
|
|
|
|
- name: Lint project using eslint
|
|
image: node:18.2.0
|
|
commands:
|
|
- yarn lint
|
|
failure: ignore
|
|
|
|
- name: Build and publish docker image
|
|
image: plugins/docker
|
|
settings:
|
|
registry: ghcr.io
|
|
repo: ghcr.io/kevinmidboe/figlet-http
|
|
dockerfile: Dockerfile
|
|
username:
|
|
from_secret: GITHUB_USERNAME
|
|
password:
|
|
from_secret: GITHUB_PASSWORD
|
|
tags: latest
|
|
# when:
|
|
# event:
|
|
# - push
|
|
# branch:
|
|
# - master
|
|
|
|
trigger:
|
|
event:
|
|
include:
|
|
- push
|
|
- pull_request |