Skip to content

Create Images and Make Release #7

Create Images and Make Release

Create Images and Make Release #7

Workflow file for this run

name: Create Images and Upload to Imgur
on:
workflow_dispatch:
schedule:
- cron: '0 12 * * *'
jobs:
upload-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Generate
run: |
python sea-surface-temps.py --mode map --dataset sst --days-ago 2 --out sst-map.png
python sea-surface-temps.py --mode map --dataset anom --days-ago 2 --out sst-anom-map.png
python sea-surface-temps.py --mode all --dataset sst --out sst-all.png
python sea-surface-temps.py --mode all --dataset anom --out sst-all-anom.png
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ steps.date.outputs.date }}
tag_name: ${{ steps.date.outputs.date }}
draft: false
prerelease: false
body: "Latest plots as of ${{ steps.date.outputs.date }}"
files: |
sst-map.png
sst-anom-map.png
sst-all.png
sst-all-anom.png