stages: - tests - build - publish check-i18n: image: debian:latest stage: tests script: - apt update - apt --yes install jq - bash utils/findMissingI18nKeys.sh build: image: node:20-bullseye stage: tests script: - npm install - npm run build generate: image: node:20-bullseye stage: build script: - npm install - npm run build - yarn generate artifacts: paths: - dist expire_in: 2 days rules: - if: $CI_COMMIT_TAG when: manual pages: stage: publish needs: ["generate"] script: - ls dist artifacts: paths: - dist expire_in: 1 week rules: - if: $CI_COMMIT_TAG endpoint_check: image: node:20-bullseye stage: build script: - | if git diff --name-only $CI_COMMIT_BEFORE_SHA $CI_COMMIT_SHA | grep -q "endpoints.json"; then npm install node graphql/generateEndpoints.js git config --global user.email "ci@duniter.org" git config --global user.name "CI Bot" git add -A git commit -m "Auto-update generated endpoints" git push https://gitlab-ci-token:${CI_PUSH_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git HEAD:$CI_COMMIT_REF_NAME else echo "No changes in endpoints.json" fi rules: - changes: - endpoints.json