Skip to content

BC-status

BC-status #4701

Workflow file for this run

# This workflow determines the number of profiles and index list of Argo profiles in BC regions, every hour
name: BC-status
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 */6 * * *'
push:
branches: [ master ]
workflow_dispatch: # allows you to trigger the workflow run manually
jobs:
check-and-report:
runs-on: ubuntu-latest
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'
# env:
# GIT_TRACE: 1
# GIT_CURL_VERBOSE: 1
- uses: actions/checkout@v4
- name: Save update time
run: date +%s > data/last_update.txt
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install argopy
run: |
python -m pip install --upgrade pip
pwd
ls -l
pip install git+https://github.com/euroargodev/argopy.git@master
pip install regionmask
python -c "import argopy; argopy.show_versions()"
- name: Check Argo status in BCs
run: |
python cli/check_save_status.py
ls -l data
- name: Save BC status
uses: EndBug/add-and-commit@v9.1.4
with:
author_name: argobot-hub
author_email: argobot84@gmail.com
message: "Update status files"
add: "data/*.json --force"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Save BC index
uses: EndBug/add-and-commit@v9.1.4
with:
author_name: argobot-hub
author_email: argobot84@gmail.com
message: 'Update index file'
add: "data/*.txt --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 census'
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