Skip to content

Check last published version #571

Check last published version

Check last published version #571

name: Check last published version
on:
schedule:
- cron: "0 0 * * *"
repository_dispatch:
types:
- check-last-version
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
name: check-last-version
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: none
coverage: none
-
name: Check new online versions
run: ./.github/workflows/check-latest-version
-
name: Check changes
id: check
run: |
if git diff --exit-code ./data/versions.json; then
echo 'No changes detected'
echo "changed=no" >>"$GITHUB_OUTPUT"
else
echo "changed=yes" >>"$GITHUB_OUTPUT"
fi
-
name: Create pull request
if: steps.check.outputs.changed == 'yes'
uses: peter-evans/create-pull-request@v5
with:
add-paths: data/versions.json
title: Add new ConcreteCMS versions
commit-message: Add new ConcreteCMS versions
delete-branch: true
branch: create-pull-request/check-last-version
body: |
Automated pull request created by https://github.com/concrete5-community/docker5/actions/runs/${{ github.run_id }}
Please close this pull request and reopen it in order to run the GitHub Actions.
-
name: Notify failures
if: failure()
uses: appleboy/telegram-action@master
with:
token: ${{ secrets.TELEGRAM_TOKEN }}
to: '-1001989057474'
message: Checking last online versions failed on https://github.com/concrete5-community/docker5/actions/runs/${{ github.run_id }}