Skip to content

Schedule for a specific date #41

Schedule for a specific date

Schedule for a specific date #41

Workflow file for this run

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: 14
- name: Backup
uses: docker://mcr.microsoft.com/azure-cli
with:
args: bash ./scripts/dump_matomo_precise_date.sh ${{ github.event.inputs.date }}
env:
AZ_STORAGE_TOKEN: ${{ secrets.AZ_STORAGE_TOKEN }}
- name: Download
uses: docker://mcr.microsoft.com/azure-cli
with:
args: bash ./scripts/download_dump_precise_date.sh ${{ github.event.inputs.date }}
env:
AZ_STORAGE_TOKEN: ${{ secrets.AZ_STORAGE_TOKEN }}
- 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 }}
- name: Create the Mattermost Message
if: failure()
run: |
echo "{\"text\":\"La synchro des données Matomo a échoué, veuillez relancer le job : ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}\"}" > mattermost.json
- uses: mattermost/action-mattermost-notify@master
if: failure()
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}