Skip to content

Check for new CumulusMX release #402

Check for new CumulusMX release

Check for new CumulusMX release #402

Workflow file for this run

name: Check for new release
# This script runs on a schedule to check for new releases from the upstream repo. If it finds a new release writes the latest release number to a file.
# Credit to peterevans on stackoverflow for the script: https://stackoverflow.com/a/58468828
on:
schedule:
- cron: '41 19 * * *'
# Enable manual trigger
workflow_dispatch:
jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- name: Fetch release version
run: bash release-check.sh
- name: Check for modified files
id: git-check
run: echo "modified=$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")" >> $GITHUB_OUTPUT
- name: Commit latest release version
if: steps.git-check.outputs.modified == 'true'
run: |
git config --global user.name 'hucknz'
git config --global user.email '[email protected]'
git commit -am "New release version found"
git push