[ADD] npc added #195
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: My_RPG_Sender | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
EXECUTABLES: "my_rpg" | |
MIRROR_URL: "[email protected]:EpitechPromo2028/B-MUL-200-MPL-2-1-myrpg-elias-josue.hajjar-llauquen.git" | |
jobs: | |
Coding_style_checker: | |
if: github.repositoryUrl != 'https://github.com/EpitechPromo2028/B-MUL-200-MPL-2-1-myrpg-elias-josue.hajjar-llauquen' | |
runs-on: ubuntu-latest | |
timeout-minutes: 4 | |
container: | |
image: ghcr.io/epitech/coding-style-checker:latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check.sh script | |
run: check.sh $(pwd) $(pwd) | |
- name: Coding style check | |
run: | | |
if [ -s coding-style-reports.log ]; then | |
while IFS= read -r line | |
do | |
FILE=$(echo $line | cut -d':' -f1) | |
LINE=$(echo $line | cut -d':' -f2) | |
MSG=$(echo $line | cut -d':' -f3) | |
echo "::error file=$FILE,line=$LINE::$MSG" | |
done < coding-style-reports.log | |
exit 1 | |
fi | |
rm -f coding-style-reports.log | |
General_tests: | |
runs-on: ubuntu-latest | |
needs: [Coding_style_checker] | |
timeout-minutes: 10 | |
defaults: | |
run: | |
working-directory: ${{ github.workspace }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check if my_rpg exist | |
run: | | |
if [ ! -f Makefile ]; then | |
echo "Error: There's no project." | |
echo "::set-output name=cancel::true" | |
exit 0 | |
fi | |
exit 0 | |
id: check_project | |
- name: Check repo size | |
run: | | |
size=$(du -sh | cut -f1) | |
if [ $size -gt 30 ]; then | |
echo "Error: Projet trop volumineux !" | |
exit 1 | |
fi | |
Send_to_repisitory: | |
needs: [General_tests] | |
timeout-minutes: 4 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: pixta-dev/repository-mirroring-action@v1 | |
with: | |
target_repo_url: ${{ env.MIRROR_URL }} | |
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} |