Images for README #45
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
# SPDX-FileCopyrightText: 2024 Manu Amestoy | |
# | |
# SPDX-License-Identifier: MIT | |
name: Run Python Code Check | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
run_check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: download latest mbedtls and cmake | |
run: | | |
sudo apt install -y curl cmake | |
curl -L https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v3.5.2.tar.gz -o mbedtls.tar.gz | |
tar -xf mbedtls.tar.gz | |
mv mbedtls-3.5.2 mbedtls | |
- name: download codee | |
run: | | |
sudo apt install -y unzip | |
curl -L https://codee.com/wp-content/uploads/2024/02/codee-2024.1.1-HackUDC.zip -o codee.zip | |
unzip codee.zip | |
tar -xf codee-2024.1.1-HackUDC/codee-2024.1.1-linux-x86_64.tar.gz | |
mv codee-2024.1.1-HackUDC/codee.lic codee-2024.1.1-linux-x86_64/ | |
# Temos no directorio raiz a carpeta codee-2024.1.1-linux-x86_64/ cargada coa licencia e a carpeta mbedtls co code | |
- name: install make tools | |
run: | | |
sudo apt install -y build-essential | |
- name: Setup Python | |
uses: actions/setup-python@v5.0.0 | |
with: | |
python-version: 3.9 | |
check-latest: false | |
- name: Run Python | |
run: | | |
pip install -r requirements.txt | |
python3 codeAnalysis.py | |
- name: Check for changes in index.html | |
id: check_changes | |
run: | | |
git diff --quiet index.html || echo "::set-output name=changed::true" | |
- name: update git repo index.html | |
if: steps.check_changes.outputs.changed == 'true' | |
run: | | |
git config --global user.name 'infiniteduck' | |
git config --global user.email '53666932+martinge17@users.noreply.github.com' | |
git add index.html | |
git commit -m 'Automated index.html update' | |
git push | |
- name: Send mail | |
uses: dawidd6/action-send-mail@v3 | |
with: | |
#connection_url: ${{ secrets.MAIL_CONNECTION }} | |
server_address: smtp-relay.brevo.com | |
server_port: 587 | |
secure: false | |
username: ${{ secrets.MAIL_MAIL }} | |
password: ${{ secrets.MAIL_PASS }} | |
subject: Reporte Codee | |
to: ${{ secrets.DEST_MAIL }} | |
from: ${{ secrets.MAIL_MAIL }} | |
body: Reporte adjunto de codee | |
attachments: index.html |