Skip to content

Commit f4b319d

Browse files
committed
Fix linting errors
- Capitalize Docker in README.md - Add persist-credentials: false to all checkout actions - Add healthcheck and non-root user to Dockerfile - Add .biomeignore to exclude vendor directory
1 parent 00bd857 commit f4b319d

4 files changed

Lines changed: 17 additions & 2 deletions

File tree

.biomeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor/

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
steps:
1616
- name: Checkout Code
1717
uses: actions/checkout@v4
18+
with:
19+
persist-credentials: false
1820

1921
- name: Install PHP
2022
uses: shivammathur/setup-php@v2
@@ -50,9 +52,12 @@ jobs:
5052
uses: actions/checkout@v4
5153
with:
5254
ref: master
55+
persist-credentials: false
5356

5457
- name: Checkout Code
5558
uses: actions/checkout@v4
59+
with:
60+
persist-credentials: false
5661

5762
- name: Install PHP
5863
uses: shivammathur/setup-php@v2

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ RUN apt-get update \
1414
&& apt-get install -y --no-install-recommends unzip \
1515
&& rm -rf /var/lib/apt/lists/*
1616

17+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
1718
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
1819

1920
WORKDIR /app
21+
22+
# Add healthcheck
23+
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
24+
CMD php -v || exit 1
25+
26+
# Run as non-root user
27+
RUN useradd -m -u 1000 appuser && chown -R appuser:appuser /app
28+
USER appuser

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ includes:
3131

3232
## Install for Local Development
3333

34-
### With docker
34+
### With Docker
3535

3636
```bash
3737
git clone git@github.com:timeweb/phpstan-enum.git
@@ -41,7 +41,7 @@ make install
4141
make phpunit
4242
```
4343

44-
### Without docker (localy installed actual version of php, composer, etc)
44+
### Without Docker (localy installed actual version of php, composer, etc)
4545

4646
```bash
4747
git clone git@github.com:timeweb/phpstan-enum.git

0 commit comments

Comments
 (0)