-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (49 loc) · 2.26 KB
/
illuminate-support-6.x.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
name: PHP-Prefixer for 6.x
on:
workflow_dispatch:
schedule:
- cron: '15 10 * * 6'
jobs:
main:
runs-on: ubuntu-latest
steps:
# PHP-Prefixer Execution Job
- name: Run PHP-Prefixer
uses: PHP-Prefixer/[email protected]
with:
personal_access_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
project_id: ${{ secrets.PROJECT_ID }}
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
repository: 'illuminate/support'
ref: '6.x'
schema: >
{"project-name": "Prefixed Illuminate package","namespaces-prefix": "PPP_L6","global-scope-prefix": "PPP_L6_"}
# composer.json Edition
- uses: actions/checkout@v2
with:
ref: 'prefixed-6.x'
fetch-depth: 0
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- name: Improve composer.json fields
run: |
sed -i 's/illuminate\/support/php-prefixer\/prefixed-illuminate-support/' '${{ github.workspace }}/composer.json'
sed -i 's/The Illuminate Support package./The Prefixed Illuminate Support package./' '${{ github.workspace }}/composer.json'
sed -i 's/laravel\.com/php-prefixer\.com/' '${{ github.workspace }}/composer.json'
sed -i 's/laravel\/framework/PHP-Prefixer\/prefixed-illuminate-support/' '${{ github.workspace }}/composer.json'
sed -i 's/Taylor Otwell/Anibal Sanchez/' '${{ github.workspace }}/composer.json'
sed -i 's/laravel\.com/php-prefixer.com/' '${{ github.workspace }}/composer.json'
sed -i 's/taylor/anibal.sanchez/' '${{ github.workspace }}/composer.json'
sed -i 's/branch-alias/php-prefixer/' '${{ github.workspace }}/composer.json'
sed -i 's/dev-master/last-build/' '${{ github.workspace }}/composer.json'
sed -i "s/[0-9].x-dev/`date`/" '${{ github.workspace }}/composer.json'
- name: Configure git
run: |
git config --local user.email "[email protected]"
git config --local user.name "PHP-Prefixer DevOps"
export CHANGED=$(git status --porcelain)
- name: Commit files
if: ${{ contains(env.CHANGED, 'M ') }}
run: |
git add -A
git commit -m "Update composer.json info."
git push