63 lines
1.0 KiB
YAML
63 lines
1.0 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
ports: [3001]
|
|
|
|
steps:
|
|
- name: restore-cache
|
|
image: drillster/drone-volume-cache
|
|
volumes:
|
|
- name: cache
|
|
path: /cache
|
|
settings:
|
|
restore: true
|
|
mount:
|
|
- ./node_modules
|
|
|
|
# Other branches
|
|
- name: install depends
|
|
image: node:18
|
|
when:
|
|
branch:
|
|
exclude:
|
|
- main
|
|
commands:
|
|
- npm install
|
|
- name: test
|
|
image: node:18
|
|
when:
|
|
branch:
|
|
exclude:
|
|
- main
|
|
commands:
|
|
- npm run lint
|
|
|
|
- name: rebuild-cache
|
|
image: drillster/drone-volume-cache
|
|
volumes:
|
|
- name: cache
|
|
path: /cache
|
|
settings:
|
|
rebuild: true
|
|
mount:
|
|
- ./node_modules
|
|
|
|
# Main branches
|
|
- name: docker
|
|
image: plugins/docker
|
|
when:
|
|
branch:
|
|
- main
|
|
settings:
|
|
username:
|
|
from_secret: dockerhub_username
|
|
password:
|
|
from_secret: dockerhub_password
|
|
repo: fascinated/beatsaber-overlay
|
|
tags: latest
|
|
|
|
volumes:
|
|
- name: cache
|
|
host:
|
|
path: /tmp/cache
|