Check for new CumulusMX release #394
Workflow file for this run
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: 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 |