snort/.drone.yml
Kieran 6ba0361ba9
Some checks failed
continuous-integration/drone/push Build is failing
Update readme
2023-06-16 09:45:05 +01:00

104 lines
2.3 KiB
YAML

---
kind: pipeline
type: kubernetes
name: crowdin
concurrency:
limit: 1
trigger:
branch: ["main"]
metadata:
namespace: git
steps:
- name: Push/Pull translations
image: node:current-bullseye
volumes:
- name: cache
path: /cache
environment:
YARN_CACHE_FOLDER: /cache/.yarn-translations
TOKEN:
from_secret: drone_gitea
CTOKEN:
from_secret: crowdin_token
commands:
- git config --global user.email drone@v0l.io
- git config --global user.name "Drone CI"
- git remote set-url origin https://drone:$TOKEN@git.v0l.io/Kieran/snort.git
- yarn install
- npx @crowdin/cli upload sources -b main -T $CTOKEN
- npx @crowdin/cli pull -b main -T $CTOKEN
- yarn workspace @snort/app format
- git add .
- 'git commit -a -m "chore: Update translations"'
- git push -u origin main
volumes:
- name: cache
claim:
name: docker-cache
---
kind: pipeline
type: kubernetes
name: docker
concurrency:
limit: 1
trigger:
branch: ["main"]
metadata:
namespace: git
steps:
- name: Build site
image: node:current-bullseye
volumes:
- name: cache
path: /cache
environment:
YARN_CACHE_FOLDER: /cache/.yarn-docker
commands:
- yarn install
- yarn build
- name: build docker image
image: r.j3ss.co/img
privileged: true
volumes:
- name: cache
path: /cache
environment:
TOKEN:
from_secret: img_token
commands:
- img login -u kieran -p $TOKEN git.v0l.io
- |-
img build -t git.v0l.io/kieran/snort:latest \
--platform linux/amd64,linux/arm64 \
-f Dockerfile.prebuilt .
- img push git.v0l.io/kieran/snort:latest
volumes:
- name: cache
claim:
name: docker-cache
---
kind: pipeline
type: kubernetes
name: test-lint
concurrency:
limit: 1
metadata:
namespace: git
steps:
- name: Test/Lint
image: node:current-bullseye
volumes:
- name: cache
path: /cache
environment:
YARN_CACHE_FOLDER: /cache/.yarn-test
commands:
- yarn install
- yarn workspace @snort/nostr build
- yarn workspace @snort/app test
- yarn workspace @snort/app eslint
- yarn workspace @snort/app prettier --check .
volumes:
- name: cache
claim:
name: docker-cache