workflow: rules: - if: $CI_COMMIT_BRANCH == "master" variables: NODE_IMAGE: node:16 stages: - build - deploy build: image: $NODE_IMAGE stage: build script: - npm i - npm run build artifacts: paths: - ./ expire_in: 1day deploy: image: $NODE_IMAGE stage: deploy variables: MESSAGE: L'extension HTML-SIPAUI pour directus est à jour. https://www.npmjs.com/package/directus-extension-platform-app-directus-htmlsipaui-extension script: - wget -qO gogci https://github.com/Ouest-France/gogci/releases/latest/download/gogci && chmod +x gogci - ./gogci vault login - eval $(./gogci vault env --vault-secret int) - echo "debug" - echo ${VAULTENV_NPM_TOKEN} - echo "//registry.npmjs.org/:_authToken=${VAULTENV_NPM_TOKEN}" > ./.npmrc - npm publish - curl -X POST -H "Content-Type:\ application/json" -d "{\"@context\":\"https://schema.org/extensions\",\"@type\":\"MessageCard\",\"themeColor\":\"0072C6\",\"title\":\"platform-app-directus-htmlsipaui-extension\",\"text\":\"$MESSAGE\"}" "https://sipaof.webhook.office.com/webhookb2/84a1d6f5-aa07-4df7-8f01-ba035af1fb4f@a59e9cc9-4ed4-43c4-9f1e-ca78d44b0072/IncomingWebhook/09426dbed5184d488468d6138e0d5950/b3669e2d-c637-441b-b37a-a9a6b9e82505" tags: - int-build dependencies: - build