Skip to content

Commit 57e3a61

Browse files
Publish to Github.
0 parents  commit 57e3a61

5 files changed

Lines changed: 121 additions & 0 deletions

File tree

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 2
9+
tab_width = 2
10+
trim_trailing_whitespace = true
11+
12+
[{Dockerfile}]
13+
indent_style = space
14+
indent_size = 4
15+
16+
[*.md]
17+
trim_trailing_whitespace = false
18+
19+
[*.{yml,yaml}]
20+
indent_size = 2

.github/workflows/cd.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: cd
2+
3+
on:
4+
push:
5+
branches: main
6+
7+
jobs:
8+
docker:
9+
runs-on: ubuntu-latest
10+
environment: production
11+
steps:
12+
- name: Set up QEMU
13+
uses: docker/setup-qemu-action@v1
14+
- name: Set up Docker Buildx
15+
uses: docker/setup-buildx-action@v1
16+
- name: Login to DockerHub
17+
uses: docker/login-action@v1
18+
with:
19+
username: ${{ secrets.DOCKERHUB_USERNAME }}
20+
password: ${{ secrets.DOCKERHUB_TOKEN }}
21+
- name: Build and push
22+
uses: docker/build-push-action@v2
23+
with:
24+
push: true
25+
tags: syncloudsoftech/pinter:latest

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM php:8.1-cli-alpine
2+
3+
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
4+
5+
RUN mkdir /tools
6+
7+
WORKDIR /tools
8+
9+
RUN composer require laravel/pint
10+
11+
ENTRYPOINT [ "/tools/vendor/bin/pint" ]
12+
13+
RUN mkdir /workspace
14+
15+
WORKDIR /workspace

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Syncloud Softech Private Limited
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# pinter
2+
3+
Lightweight (based on [Alpine](https://www.alpinelinux.org/)) [Docker](https://www.docker.com) image for running [laravel/pint](https://github.com/laravel/pint) code-style fixer regardless of [Laravel](https://laravel.com/) or [PHP](https://www.php.net/) version you may have.
4+
5+
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/syncloudsoftech/pinter/cd)
6+
![Docker Pulls](https://img.shields.io/docker/pulls/syncloudsoftech/pinter)
7+
8+
## Usage
9+
10+
To use this image, you must have [Docker](https://www.docker.com) installed.
11+
If already, run the below command in your [Laravel](https://laravel.com/) or [PHP](https://www.php.net/) project folder:
12+
13+
```shell
14+
$ docker run -it --rm -v $PWD:/workspace syncloudsoftech/pinter
15+
```
16+
17+
You can pass options to pint such as a `--preset` (default is `laravel`) or `--test` easily as below:
18+
19+
```shell
20+
$ docker run -it --rm -v $PWD:/workspace syncloudsoftech/pinter --preset psr12
21+
```
22+
23+
## Development
24+
25+
Building or modifying the container yourself from source is also quite easy.
26+
Just clone the repository and run below command:
27+
28+
```shell
29+
$ docker build -t pinter .
30+
```
31+
32+
Run the locally built container as follows:
33+
34+
```shell
35+
$ docker run -it --rm -v $PWD:/workspace pinter
36+
```
37+
38+
## License
39+
40+
See the [LICENSE](LICENSE) file.

0 commit comments

Comments
 (0)