-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (27 loc) · 1.05 KB
/
release-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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