NRT-classif #4278
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
# This workflow aims to produce Near Real Time classification of profiles in BCs | |
name: NRT-classif | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '30 */6 * * *' | |
workflow_dispatch: # allows you to trigger the workflow run manually | |
jobs: | |
classify-and-report: | |
runs-on: ubuntu-latest | |
environment: COPERNICUS_MARINE_SERVICE | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Energy Estimation - Initialize | |
uses: green-coding-berlin/eco-ci-energy-estimation@v3 | |
with: | |
task: start-measurement | |
company-uuid: ${{ secrets.CARBONDB_COMPANY_UUID }} | |
project-uuid: ${{ secrets.CARBONDB_PROJECT_UUID }} | |
continue-on-error: true | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: 'main' | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Setup Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
micromamba-version: '1.5.10-0' | |
environment-name: bc-monitor | |
environment-file: environment39-free.yml | |
cache-environment: true | |
- name: Login to Copernicus Marine Service | |
env: | |
USERNAME: ${{secrets.COPERNICUS_MARINE_SERVICE_USERNAME}} | |
PASSWORD: ${{secrets.COPERNICUS_MARINE_SERVICE_PASSWORD}} | |
run: | | |
copernicusmarine login --username $USERNAME --password $PASSWORD --overwrite-configuration-file --log-level INFO | |
- name: Classify and report | |
run: | | |
python cli/load_classif_save.py | |
ls -l data | |
- name: Save report | |
uses: EndBug/add-and-commit@v9.1.4 | |
with: | |
author_name: argobot-hub | |
author_email: argobot84@gmail.com | |
message: 'Update PCM analysis results' | |
add: "data/* --force" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Energy Estimation - Get Measurement | |
uses: green-coding-berlin/eco-ci-energy-estimation@v3 | |
with: | |
task: get-measurement | |
label: 'BCmonitor PCM classif' | |
company-uuid: ${{ secrets.CARBONDB_COMPANY_UUID }} | |
project-uuid: ${{ secrets.CARBONDB_PROJECT_UUID }} | |
continue-on-error: true | |
- name: Energy Estimation - Show Results | |
uses: green-coding-berlin/eco-ci-energy-estimation@v3 | |
with: | |
task: display-results | |
company-uuid: ${{ secrets.CARBONDB_COMPANY_UUID }} | |
project-uuid: ${{ secrets.CARBONDB_PROJECT_UUID }} | |
continue-on-error: true |