Skip to content

Send validation summary email #97

Send validation summary email

Send validation summary email #97

name: Send validation summary email
on:
schedule:
- cron: '0 0 * * MON'
env:
GCP_SA_KEY: ${{ secrets.PESKAS_DATAINGESTION_GCS_KEY }}
PESKAS_GMAIL_KEY: ${{ secrets.PESKAS_GMAIL_KEY }}
VALID_SHEET_ID: ${{ secrets.VALID_SHEET_ID }}
jobs:
build-container:
name: Build R container
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build image with cache
id: build-docker
uses: whoan/docker-build-with-cache-action@v5
with:
username: $GITHUB_ACTOR
password: "${{ secrets.GITHUB_TOKEN }}"
registry: docker.pkg.github.com
image_name: r-runner-peskas-timor
dockerfile: Dockerfile.prod
send-mail:
name: Send summary mail
needs: [build-container]
runs-on: ubuntu-20.04
container:
image: docker.pkg.github.com/worldfishcenter/peskas.timor.data.pipeline/r-runner-peskas-timor
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Set env to production
if: endsWith(github.ref, '/main')
run: echo "R_CONFIG_ACTIVE=production" >> $GITHUB_ENV
- name: Call send_validation_mail()
run: Rscript -e 'peskas.timor.data.pipeline::send_validation_mail()'