Skip to content

send-email-fcre

send-email-fcre #506

name: 'send-email-fcre'
on:
workflow_dispatch:
schedule:
- cron: '30 10 * * *'
jobs:
test-update-file:
runs-on: ubuntu-latest
steps:
- name: Checkout files
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Update gmail_username
uses: fjogeleit/yaml-update-action@main
with:
valueFile: 'config-fcre.yml'
propertyPath: gmail.username
value: ${{ secrets.GMAIL_USERNAME }}
commitChange: false
- name: Update gmail_password
uses: fjogeleit/yaml-update-action@main
with:
valueFile: 'config-fcre.yml'
propertyPath: gmail.password
value: ${{ secrets.GMAIL_PASSWORD }}
commitChange: false
- name: Cat .yml
run: cat ${{ github.workspace }}/config-fcre.yml
- name: Update Last Run Date
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git pull
echo "FCRE Sent: $(date)" >> last-run.txt
git add last-run.txt
git commit -m "Update last run date"
git push
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run send-email container
run: |
docker run --rm -v ${{ github.workspace }}:/root/flare/config --env CONFIG_FILE="/root/flare/config/config-fcre.yml" flareforecast/send-email:latest