stream/.drone.yaml

67 lines
1.5 KiB
YAML
Raw Normal View History

2023-08-01 09:50:46 +00:00
---
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 eslint src/
- yarn prettier --check src/
2023-08-01 10:01:00 +00:00
- yarn tsc --noEmit
2023-08-01 09:50:46 +00:00
volumes:
- name: cache
claim:
2023-08-22 21:50:26 +00:00
name: docker-cache
2023-08-27 16:51:41 +00:00
---
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: gitea
CTOKEN:
from_secret: crowdin
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/stream.git
- yarn install
- npx @crowdin/cli upload sources -b main -T $CTOKEN
- npx @crowdin/cli pull -b main -T $CTOKEN
2023-11-14 15:13:51 +00:00
- yarn prettier --write .
2023-08-27 16:51:41 +00:00
- git add .
2023-11-14 15:13:51 +00:00
- >
if output=$(git status --porcelain) && [ -n "$output" ]; then
git commit -a -m "chore: Update translations"
git push -u origin main
fi
2023-08-27 16:51:41 +00:00
volumes:
- name: cache
claim:
2023-08-28 14:54:50 +00:00
name: docker-cache