Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All bib test #52

Merged
merged 21 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 10 additions & 18 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
name: Docker Image CI
name: Docker Build and Run

on:
push:
branches: [ "main" ]
branches: [ main ]
pull_request:
branches: [ "main" ]
branches: [ main ]

jobs:
push_to_registries:
name: Build Docker images
build-and-run:
runs-on: ubuntu-latest

steps:
- name: Check out the repo
uses: actions/checkout@v4
- uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: docker build ./docker/check -t mon-image

- name: Build Docker images
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/check/Dockerfile
platforms: linux/amd64,linux/arm64
push: false
- name: Run Docker container
run: docker run mon-image
2 changes: 1 addition & 1 deletion docker/check/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ ADD . /data
WORKDIR /data

# Définir le script d'entrypoint
ENTRYPOINT ["/data/web/generate.sh"]
ENTRYPOINT ["/data/web/check.sh"]

27 changes: 27 additions & 0 deletions web/check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Chemin du répertoire à partir duquel la recherche commence
SEARCH_DIR="."

# Recherche de tous les fichiers .bib dans le répertoire et ses sous-répertoires
# et les traiter avec Pandoc
for bibfile in $(find . -name "*.bib"); do
echo "Traitement du fichier: $bibfile"

pandoc "$bibfile" -s -o "output_file" --to=markdown

# Vérifier si Pandoc a réussi
if [ $? -ne 0 ]; then
echo "Erreur lors du traitement de $bibfile"
error_occurred=1
rm output_file
fi
done

# Quitter avec un code d'erreur si une erreur a été rencontrée
if [ $error_occurred -ne 0 ]; then
exit 1
fi
rm output_file
# Si tout va bien, quitter avec un code de sortie 0
exit 0
5 changes: 0 additions & 5 deletions web/generate.sh

This file was deleted.

Loading