Check URL from base de données publique des médicaments #580
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check URL from base de données publique des médicaments | |
on: | |
schedule: | |
- cron: "00 12 * * *" | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
check-bdd-medicaments: | |
name: Check URL from base de données publique des médicaments | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
list: | |
- url: >- | |
https://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_bdpm.txt | |
word: '61266250' | |
- url: >- | |
https://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_CIP_bdpm.txt | |
word: '60002283' | |
- url: >- | |
https://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_COMPO_bdpm.txt | |
word: '60002283' | |
- url: >- | |
https://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_HAS_SMR_bdpm.txt | |
word: '60054077' | |
- url: >- | |
https://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_HAS_ASMR_bdpm.txt | |
word: '60054077' | |
- url: >- | |
https://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=HAS_LiensPageCT_bdpm.txt | |
word: CT-20086 | |
- url: >- | |
https://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_GENER_bdpm.txt | |
word: AMOXICILLINE | |
- url: >- | |
https://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_CPD_bdpm.txt | |
word: '60355340' | |
- url: >- | |
https://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_InfoImportantes.txt | |
word: '60002504' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Check if user can download file | |
run: | | |
curl ${{ matrix.list.url }} | grep -q ${{ matrix.list.word }} | |
if [[ $? -eq 0 ]]; then | |
echo "File is available" | |
else | |
echo "File is not available" | |
exit 1 | |
fi |