forked from naskio/docker-strapi
-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (39 loc) · 1.51 KB
/
auto-check-new-releases.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
name: Check for new releases
on:
schedule:
- cron: "15 0 */1 * *"
- cron: "0 0 */1 * *"
workflow_dispatch:
jobs:
get-v4-version:
name: V4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- name: Fetch v4 release version
id: fetch-v4-version
if: contains(github.event.schedule, '0 0 */1 * *')
run: |
curl -sL https://raw.githubusercontent.com/strapi/strapi/v4/packages/core/strapi/package.json | jq -r ".version" > release-versions/strapi-v4-latest.txt
echo "version=$(cat release-versions/strapi-v4-latest.txt)" >> "$GITHUB_OUTPUT"
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: New auto release v${{steps.fetch-v4-version.outputs.version}}
get-v5-version:
name: V5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- name: Fetch v5 release version
id: fetch-v5-version
if: contains(github.event.schedule, '15 0 */1 * *')
run: |
curl -sL https://raw.githubusercontent.com/strapi/strapi/main/packages/core/strapi/package.json | jq -r ".version" > release-versions/strapi-v5-latest.txt
echo "version=$(cat release-versions/strapi-v5-latest.txt)" >> "$GITHUB_OUTPUT"
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: New auto release v${{steps.fetch-v5-version.outputs.version}}