generated from tenantcloud/php-package-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: Add template sync * chore: Sync changes from the template (#47) Co-authored-by: oprypkhantc <54406427+oprypkhantc@users.noreply.github.com> --------- Co-authored-by: package-sync[bot] <165811605+package-sync[bot]@users.noreply.github.com>
- Loading branch information
1 parent
5b37fe6
commit a94518b
Showing
11 changed files
with
250 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"repositories": [ | ||
{ | ||
"url": "https://github.com/tenantcloud/php-package-skeleton", | ||
"branch": "sync" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Template sync | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '*/5 * * * *' | ||
|
||
jobs: | ||
sync: | ||
name: Sync | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Sync from template | ||
id: sync_from_template | ||
uses: tenantcloud/template-sync@v1.0.0-alpha.9 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Reformat | ||
uses: actionsx/prettier@v2 | ||
with: | ||
args: --write . | ||
|
||
- name: Generate token to read from source repo | ||
id: generate_token | ||
uses: tibdex/github-app-token@v1 | ||
with: | ||
app_id: ${{ secrets.PACKAGE_SYNC_APP_ID }} | ||
private_key: ${{ secrets.PACKAGE_SYNC_PRIVATE_KEY }} | ||
|
||
- name: Create PR | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ steps.generate_token.outputs.token }} | ||
committer: 'package-sync[bot] <165811605+package-sync[bot]@users.noreply.github.com>' | ||
branch: 'template-sync' | ||
delete-branch: true | ||
title: 'chore: Sync changes from the template' | ||
commit-message: 'chore: Sync changes from the template' | ||
body: ${{ steps.sync_from_template.outputs.report }} | ||
assignees: oprypkhantc | ||
reviewers: oprypkhantc | ||
|
||
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | ||
# GitHub automatically disables `schedule` workflows in public repositories | ||
# after 60 days without commits, so this job is there to prevent it. | ||
workflow-keepalive: | ||
name: Workflow keepalive | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'schedule' | ||
|
||
permissions: | ||
actions: write | ||
|
||
steps: | ||
- uses: liskin/gh-workflow-keepalive@v1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CHANGELOG.md | ||
|
||
/.idea | ||
/build | ||
/coverage | ||
/tmp | ||
/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
singleQuote: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
# Commands | ||
|
||
Here are some of the commands that you'll need: | ||
- install dependencies: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer install` | ||
- run tests with phpunit: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer test` | ||
- reformat using php-cs-fixer: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer cs-fix` | ||
- analyse with phpstan: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer phpstan` | ||
|
||
- install dependencies: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer install` | ||
- run tests with phpunit: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer test` | ||
- reformat using php-cs-fixer: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer cs-fix` | ||
- reformat the rest with prettier: `docker run -it --rm -v $PWD:/app -w /app tmknom/prettier --write .` | ||
- analyse with phpstan: `docker run -it --rm -v $PWD:/app -w /app chialab/php-dev:8.2 composer phpstan` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.