-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,44 @@ | ||
# Based on: https://github.com/samapriya/Earth-Engine-Datasets-List/blob/master/.github/workflows/gee_catalog.yml | ||
# Author: Roy Samapriya | ||
# Edited by : Antony Barja | ||
name: gee_catalog_lightweight | ||
on: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 * * * *' # Ejecutar cada hora | ||
- cron: '0 * * * *' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: checkout repo content | ||
uses: actions/checkout@v2 # Checkout the repository content to GitHub runner | ||
uses: actions/checkout@v2 # checkout the repository content to github runner | ||
|
||
- name: setup python | ||
uses: actions/setup-python@v2 | ||
|
||
- name: install python packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install earthengine-api # Instala cualquier paquete adicional necesario | ||
python -m pip install --upgrade pip | ||
pip install earthengine-api | ||
- name: dataset upgrade | ||
run: | | ||
python3 .github/db_up.py # Ejecuta el script db_up.py para actualizar dataset.json | ||
- name: delete old dataset.json | ||
run: | | ||
rm -f inst/dataset.json # Elimina el archivo dataset.json anterior si existe | ||
python3 ./.github/ee_up.py | ||
- name: file_check | ||
run: ls -l -a | ||
- name: commit files | ||
continue-on-error: true # Continuar si no hay cambios para comprometer | ||
continue-on-error: true | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
today=$(date +"%Y-%m-%d %H:%M:%S") | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add -A | ||
git status # Verifica el estado de los archivos antes de commit | ||
git commit -m "updated earthengine version ${today}" -a || echo "No changes to commit" # Commit con mensaje dinámico de fecha | ||
git commit -m "updated earthengine version ${today}" -a | ||
- name: push changes | ||
continue-on-error: true # Continuar si no hay cambios para empujar | ||
continue-on-error: true | ||
uses: ad-m/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: master # Empuja los cambios a la rama master | ||
branch: master |