-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (54 loc) · 2.14 KB
/
callable-watch.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
56
57
58
59
60
61
62
63
64
65
name: Watch for changes
on:
workflow_call:
inputs:
original_repository:
required: true
type: string
push_repository:
required: true
type: string
secrets:
token:
required: true
jobs:
generated-code:
name: Update recipes
runs-on: Ubuntu-20.04
steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
- name: Checkout code
uses: actions/checkout@v2
with:
ref: main
- name: Install dependencies
uses: ramsey/composer-install@v2
- name: Regenerate code against last version
run: vendor/bin/yaml-to-php ${{ inputs.original_repository }}
- name: Checkout .github directory
run: rm -rf .github && git checkout .github
- name: Show changes
run: git status
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.token }}
push-to-fork: ${{ inputs.push_repository }}
author: Schranz PHP Recipes Bot <[email protected]>
committer: Schranz PHP Recipes Bot <[email protected]>
commit-message: Update recipes ${{ steps.date.outputs.date }}
title: Update recipes ${{ steps.date.outputs.date }}
body: |
| Q | A
| ------------- | ---
| License | MIT
The Symfony Recipes changed with version ${{ steps.fetch_version.outputs.last }}.
This PR contains the new definition for recipes.
branch: bot-code-update