Skip to content

Commit 29c87a1

Browse files
committed
move to PHPCSStandards
1 parent a68196c commit 29c87a1

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

.github/workflows/build.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,6 @@ jobs:
4848
with:
4949
push: ${{ github.event_name != 'pull_request' }}
5050
tags: ${{ steps.meta.outputs.tags }}
51-
labels: ${{ steps.meta.outputs.labels }}
51+
labels: ${{ steps.meta.outputs.labels }}
52+
build-args: |
53+
VERSION=3.11.1

Dockerfile

+21-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
1-
FROM php:8.3-alpine
1+
FROM php:8.4-alpine AS base
22

3-
RUN apk add --no-cache patch
3+
FROM base AS builder
44

5-
RUN pear install PHP_CodeSniffer-3.7.2
5+
RUN curl -OL https://phar.io/releases/phive.phar && \
6+
curl -OL https://phar.io/releases/phive.phar.asc && \
7+
apk add --no-cache --virtual .gpg gpg gpg-agent && \
8+
gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79 && \
9+
gpg --verify phive.phar.asc phive.phar && \
10+
chmod +x phive.phar
11+
12+
ARG VERSION
13+
14+
RUN ./phive.phar install --trust-gpg-keys 689DAD778FF08760E046228BA978220305CD5C32 phpcs@$VERSION
15+
RUN ./phive.phar install --trust-gpg-keys 689DAD778FF08760E046228BA978220305CD5C32 phpcbf@$VERSION
16+
17+
RUN /tools/phpcs --version
18+
RUN /tools/phpcbf --version
19+
20+
FROM base
21+
22+
COPY --from=builder /tools/phpcs /usr/bin/phpcs
23+
COPY --from=builder /tools/phpcbf /usr/bin/phpcbf

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PHPCS
22

3-
This is a docker image for [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)
3+
This is a docker image for [PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer)
44

55
## Usage
66

0 commit comments

Comments
 (0)