forked from eco4cast/neon4cast-ci
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from eco4cast/prod
Prod to main
- Loading branch information
Showing
37 changed files
with
1,729 additions
and
1,183 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 |
---|---|---|
|
@@ -6,7 +6,143 @@ on: | |
name: catalog | ||
|
||
jobs: | ||
catalog: | ||
metadata_catalog: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
OSN_KEY: ${{ secrets.OSN_KEY }} | ||
OSN_SECRET: ${{ secrets.OSN_SECRET }} | ||
container: eco4cast/rocker-neon4cast:latest | ||
steps: | ||
- run: git config --system --add safe.directory '*' | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
ref: prod | ||
fetch-depth: 0 | ||
set-safe-directory: '*' | ||
|
||
- name: install validator | ||
run: | | ||
pip install stac-validator | ||
- name: Render metadata | ||
shell: Rscript {0} | ||
run: source("catalog/model_metadata.R") | ||
|
||
- name: Render catalog | ||
shell: Rscript {0} | ||
run: source("catalog/catalog.R") | ||
|
||
- name: Commit and Push | ||
run: | | ||
git pull | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add catalog/* . | ||
git commit -a -m "update catalog" || echo "nothing to commit" | ||
git push https://${GITHUB_PAT}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY} | ||
forecasts: | ||
needs: metadata_catalog | ||
if: success() || failure() | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
OSN_KEY: ${{ secrets.OSN_KEY }} | ||
OSN_SECRET: ${{ secrets.OSN_SECRET }} | ||
container: eco4cast/rocker-neon4cast:latest | ||
steps: | ||
- run: git config --system --add safe.directory '*' | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
ref: prod | ||
fetch-depth: 0 | ||
set-safe-directory: '*' | ||
|
||
- name: install validator | ||
run: | | ||
pip install stac-validator | ||
- name: Render | ||
shell: Rscript {0} | ||
run: source('catalog/forecasts/forecast_models.R') | ||
|
||
- name: Commit and Push | ||
run: | | ||
git pull | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add catalog/* . | ||
git commit -a -m "update catalog" || echo "nothing to commit" | ||
git push https://${GITHUB_PAT}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY} | ||
scores: | ||
needs: forecasts | ||
if: success() || failure() | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
OSN_KEY: ${{ secrets.OSN_KEY }} | ||
OSN_SECRET: ${{ secrets.OSN_SECRET }} | ||
container: eco4cast/rocker-neon4cast:latest | ||
steps: | ||
- run: git config --system --add safe.directory '*' | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
ref: prod | ||
fetch-depth: 0 | ||
set-safe-directory: '*' | ||
|
||
- name: install validator | ||
run: | | ||
pip install stac-validator | ||
- name: Render | ||
shell: Rscript {0} | ||
run: source('catalog/scores/scores_models.R') | ||
|
||
- name: Commit and Push | ||
run: | | ||
git pull | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add catalog/* . | ||
git commit -a -m "update catalog" || echo "nothing to commit" | ||
git push https://${GITHUB_PAT}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY} | ||
inventory: | ||
needs: scores | ||
if: success() || failure() | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
OSN_KEY: ${{ secrets.OSN_KEY }} | ||
OSN_SECRET: ${{ secrets.OSN_SECRET }} | ||
container: eco4cast/rocker-neon4cast:latest | ||
steps: | ||
- run: git config --system --add safe.directory '*' | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
ref: prod | ||
fetch-depth: 0 | ||
set-safe-directory: '*' | ||
|
||
- name: install validator | ||
run: | | ||
pip install stac-validator | ||
- name: Render | ||
shell: Rscript {0} | ||
run: source('catalog/inventory/create_inventory_page.R') | ||
|
||
- name: Commit and Push | ||
run: | | ||
git pull | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add catalog/* . | ||
git commit -a -m "update catalog" || echo "nothing to commit" | ||
git push https://${GITHUB_PAT}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY} | ||
summaries: | ||
needs: inventory | ||
if: success() || failure() | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -18,23 +154,102 @@ jobs: | |
|
||
- uses: actions/checkout@v3 | ||
with: | ||
ref: prod | ||
fetch-depth: 0 | ||
set-safe-directory: '*' | ||
ref: prod | ||
fetch-depth: 0 | ||
set-safe-directory: '*' | ||
|
||
- name: install validator | ||
run: | | ||
pip install stac-validator | ||
- name: Render | ||
shell: Rscript {0} | ||
run: source('catalog/summaries/summaries_models.R') | ||
|
||
- name: Commit and Push | ||
run: | | ||
git pull | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add catalog/* . | ||
git commit -a -m "update catalog" || echo "nothing to commit" | ||
git push https://${GITHUB_PAT}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY} | ||
noaa: | ||
needs: summaries | ||
if: success() || failure() | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
OSN_KEY: ${{ secrets.OSN_KEY }} | ||
OSN_SECRET: ${{ secrets.OSN_SECRET }} | ||
container: eco4cast/rocker-neon4cast:latest | ||
steps: | ||
- run: git config --system --add safe.directory '*' | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
ref: prod | ||
fetch-depth: 0 | ||
set-safe-directory: '*' | ||
|
||
- name: install validator | ||
run: | | ||
pip install stac-validator | ||
- name: Render | ||
shell: Rscript {0} | ||
run: source("catalog/update_stac.R") | ||
run: source('catalog/noaa_forecasts/noaa_forecasts.R') | ||
|
||
- name: Commit and Push | ||
run: | | ||
git pull | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add catalog/* . | ||
git commit -a -m "update catalog" || echo "nothing to commit" | ||
git push https://${GITHUB_PAT}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY} | ||
targets_sites: | ||
needs: noaa | ||
if: success() || failure() | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
OSN_KEY: ${{ secrets.OSN_KEY }} | ||
OSN_SECRET: ${{ secrets.OSN_SECRET }} | ||
container: eco4cast/rocker-neon4cast:latest | ||
steps: | ||
- run: git config --system --add safe.directory '*' | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
ref: prod | ||
fetch-depth: 0 | ||
set-safe-directory: '*' | ||
|
||
- name: install validator | ||
run: | | ||
pip install stac-validator | ||
- name: Render targets | ||
shell: Rscript {0} | ||
run: source('catalog/targets/create_targets_page.R') | ||
|
||
- name: Render sites | ||
shell: Rscript {0} | ||
run: source('catalog/sites/build_sites_page.R') | ||
|
||
- name: Commit and Push | ||
run: | | ||
git pull | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add catalog/* . | ||
git commit -a -m "update catalog" || echo "nothing to commit" | ||
git push https://${GITHUB_PAT}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY} | ||
Healthcheck: | ||
needs: [metadata_catalog, forecasts, scores, inventory, summaries, noaa, targets_sites] | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
container: eco4cast/rocker-neon4cast:latest | ||
steps: | ||
- name: Call Healthcheck | ||
run: | | ||
curl -m 10 --retry 5 https://hc-ping.com/22fcd257-7930-455c-948d-0f913743b0c3 |
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
Oops, something went wrong.