-
Notifications
You must be signed in to change notification settings - Fork 9
55 lines (52 loc) · 1.75 KB
/
check-latest-version.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Check last published version
on:
schedule:
- cron: "0 0 * * *"
repository_dispatch:
types:
- check-last-version
jobs:
check:
runs-on: ubuntu-latest
name: check-last-version
steps:
- name: Checkout
uses: actions/checkout@v3
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 }}