-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (34 loc) · 1.17 KB
/
schedule_day.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Schedule for a specific date
on:
workflow_dispatch:
inputs:
date:
description: 'Date à laquelle, on récupère la donnée (format: yyyy-mm-dd)'
required: true
jobs:
backup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20.3.1
cache: "yarn"
- name: Retrieve data
run: "./scripts/dump_matomo_precise_date.sh ${{ github.event.inputs.date }}"
- name: Ingest
run: |
yarn
yarn monolog ingest
env:
CDTN_API_URL: https://code-du-travail-numerique-dev.dev.fabrique.social.gouv.fr
ELASTICSEARCH_URL: ${{ secrets.ELASTICSEARCH_URL }}
API_KEY: ${{ secrets.API_KEY }}
- uses: mattermost/action-mattermost-notify@master
if: failure()
with:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
PAYLOAD: |
La récupération des données pour monolog a échoué.
[Les logs sont disponibles ici](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})