variables:
  volumes: &volumes
    - /data/${CI_REPO}:/builds

when:
  event: [tag, push, pull_request, manual]
  branch: [master, develop, feature/*, fix/*, bugfix/*, translations]

steps:
  "Install dependencies":
    image: node:16
    pull: true
    commands:
      - npm i

  "Build JS":
    image: node:16
    commands:
      - npm run build

  "Build translations":
    image: deblan/php:8.3
    commands:
      - php bin/generate_l10n.php

  "Build cache":
    image: gitnet.fr/deblan/woodpecker-cache
    volumes: *volumes
