Skip to content

watchy-data

watchy-data #2600

Workflow file for this run

name: Data watchy
on:
repository_dispatch:
types: [watchy-data]
inputs:
data-name:
description: 'Data to add'
required: true
default: ''
date:
description: 'Date of the data'
required: true
default: ''
hour:
description: 'Hour of the data'
required: true
default: ''
data:
description: 'The data'
required: true
default: ''
jobs:
update-data:
name: Update watchy ${{ github.event.client_payload.data-name }} data
#concurrency:
# group: ci-watchy-${{ github.event.client_payload.data-name }}
# cancel-in-progress: false
runs-on: ubuntu-22.04
timeout-minutes: 3
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Show data
run: |
echo "data-name : ${{ github.event.client_payload.data-name }}"
echo "date : ${{ github.event.client_payload.date }}"
echo "hour : ${{ github.event.client_payload.hour }}"
echo "data : ${{ github.event.client_payload.data }}"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r watchy/requirements.txt
- uses: ahmadnassri/action-workflow-queue@v1
- name: Pull modif
run: git pull
- name: Update csv
run: |
cd watchy
python scripts/update-${{ github.event.client_payload.data-name }}.py \
"${{ github.event.client_payload.data-name }}" \
"${{ github.event.client_payload.date }}" \
"${{ github.event.client_payload.hour }}" \
"${{ github.event.client_payload.data }}"
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update data for watchy ${{ github.event.client_payload.data-name }}