-
-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (35 loc) · 1.32 KB
/
laravel-update.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
on:
schedule:
- cron: '0 18 * * *'
name: Laravel update
jobs:
latest-version:
name: Get Latest Laravel release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Get Latest laravel release
id: latest_laravel_release
uses: abatilo/[email protected]
with:
owner: laravel
repo: framework
- name: Get Current Laravel Release from composer.json
run: echo ::set-env name=CURRENT_LARAVEL_RELEASE::$(composer show 'illuminate/support' | grep 'versions' | grep -o -E '\*\ .+' | cut -d'v' -f2;)
- name: Require the new release
env:
LATEST_LARAVEL_RELEASE: ${{ steps.latest_laravel_release.outputs.latest_tag }}
if: env.LATEST_LARAVEL_RELEASE > env.CURRENT_LARAVEL_RELEASE
run: |
composer require illuminate/support:^${LATEST_LARAVEL_RELEASE:1:3} illuminate/view:^${LATEST_LARAVEL_RELEASE:1:3}
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update dependencies for new Laravel release
title: Update dependencies for new Laravel release
assignees: prinsfrank
reviewers: prinsfrank