Monitor IPC food insecurity #255
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
name: Monitor IPC food insecurity | |
on: | |
workflow_dispatch: | |
inputs: | |
HS_FIRST_RUN: | |
required: true | |
type: choice | |
default: "FALSE" | |
options: | |
- "TRUE" | |
- "FALSE" | |
HS_DRY_RUN: | |
required: true | |
type: choice | |
default: "TRUE" | |
options: | |
- "TRUE" | |
- "FALSE" | |
HS_LOCAL: | |
required: true | |
type: choice | |
default: "TRUE" | |
options: | |
- "TRUE" | |
- "FALSE" | |
LOG_LEVEL: | |
required: true | |
type: choice | |
default: "DEBUG" | |
options: | |
- "DEBUG" | |
- "INFO" | |
- "WARNING" | |
- "ERROR" | |
schedule: | |
- cron: "0 8 * * 1-5" | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
env: | |
HS_EMAIL: ${{ secrets.HS_EMAIL}} | |
HS_SURVEY_LINK: ${{ secrets.HS_SURVEY_LINK}} | |
IPC_API_KEY: ${{ secrets.IPC_API_KEY }} | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
DSCI_AZ_BLOB_DEV_SAS_WRITE: ${{ secrets.DSCI_AZ_BLOB_DEV_SAS_WRITE }} | |
DSCI_AZ_BLOB_PROD_SAS_WRITE: ${{ secrets.DSCI_AZ_BLOB_PROD_SAS_WRITE }} | |
MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }} | |
HS_LOCAL: ${{ inputs.HS_LOCAL || 'FALSE' }} | |
HS_FIRST_RUN: ${{ inputs.HS_FIRST_RUN || 'FALSE' }} | |
HS_DRY_RUN: ${{ inputs.HS_DRY_RUN || 'FALSE' }} | |
LOG_LEVEL: ${{ inputs.LOG_LEVEL || 'DEBUG' }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up environment | |
uses: ocha-dap/hdx-signals-actions@v3 | |
- name: Run R monitoring script | |
uses: nick-fields/retry@v3 | |
with: | |
max_attempts: 2 | |
timeout_minutes: 20 | |
retry_on: error | |
retry_wait_seconds: 120 | |
shell: bash | |
command: Rscript ./src/indicators/ipc_food_insecurity/__init__.R |