39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
name: Get latest Actual release
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 23 * * *'
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
get-version:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.PAT }}
|
|
|
|
- name: Fetch release version
|
|
run: |
|
|
curl -sL https://api.github.com/repos/actualbudget/actual/releases/latest | \
|
|
jq -r ".tag_name" > actual-latest.txt
|
|
|
|
- name: Check for modified files
|
|
id: git-check
|
|
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
|
|
|
|
- name: Commit latest release version
|
|
if: steps.git-check.outputs.modified == 'true'
|
|
run: |
|
|
git config --global user.name 'Robert Dyer'
|
|
git config --global user.email 'rdyer@unl.edu'
|
|
git commit -am "New Actual release version"
|
|
git push
|