Comments (5)
It is part of my composer.json anyway in my projects:
name: "CI"
on: # yamllint disable-line rule:truthy
pull_request: ~
push:
branches:
- "master"
env:
DATANA_BOT_EMAIL: "[email protected]"
DATANA_BOT_NAME: "datana-bot"
REQUIRED_PHP_EXTENSIONS: "ctype, filter, hash, iconv, imagick"
PHP_INI_VALUES: "date.timezone=Europe/Berlin"
jobs:
coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.3"
steps:
# workaround for missing secret in fork PRs - see https://github.com/actions/checkout/issues/298
# see https://github.com/rectorphp/rector/commit/d395e1c28b8e6a56711dcc2e10490a82965850e4
- if: github.actor != 'dependabot[bot]'
name: "Checkout"
uses: "actions/checkout@v4"
with:
ref: "${{ github.head_ref }}"
# Must be used to be able to commit changed files
token: "${{ secrets.DATANA_BOT_TOKEN }}"
# in forks, the token is not available - so we cannot use it
- if: github.actor == 'dependabot[bot]'
name: "Checkout"
uses: "actions/checkout@v4"
with:
ref: "${{ github.head_ref }}"
-
name: "Install PHP with extensions"
uses: "shivammathur/[email protected]"
with:
coverage: "none"
extensions: "${{ env.REQUIRED_PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
ini-values: "${{ env.PHP_INI_VALUES }}"
tools: composer:v2
-
name: "Validate composer.json"
run: "composer validate"
-
name: "Composer install"
uses: "ramsey/[email protected]"
with:
composer-options: "--no-scripts"
-
name: "Run ergebnis/composer-normalize"
run: "composer normalize"
-
name: "Commit files normalized with ergebnis/composer-normalize"
uses: "stefanzweifel/[email protected]"
with:
branch: "${{ github.head_ref }}"
commit_author: "${{ env.DATANA_BOT_NAME }} <${{ env.DATANA_BOT_EMAIL }}>"
commit_message: "Fix: Run 'composer normalize'"
commit_user_email: "${{ env.DATANA_BOT_EMAIL }}"
commit_user_name: "${{ env.DATANA_BOT_NAME }}"
-
name: "Create cache directory for friendsofphp/php-cs-fixer"
run: "mkdir -p .build/php-cs-fixer"
-
name: "Cache cache directory for friendsofphp/php-cs-fixer"
uses: "actions/cache@v4"
with:
path: ".build/php-cs-fixer"
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ github.sha }}"
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-"
-
name: "Run friendsofphp/php-cs-fixer"
run: "vendor/bin/php-cs-fixer fix --diff --verbose"
-
name: "Commit files fixed with friendsofphp/php-cs-fixer"
uses: "stefanzweifel/[email protected]"
with:
branch: "${{ github.head_ref }}"
commit_author: "${{ env.DATANA_BOT_NAME }} <${{ env.DATANA_BOT_EMAIL }}>"
commit_message: "Fix: Run 'php-cs-fixer fix'"
commit_user_email: "${{ env.DATANA_BOT_EMAIL }}"
commit_user_name: "${{ env.DATANA_BOT_NAME }}"
from php-cs-fixer-ga.
I've checked how we solve the similar problem over at https://github.com/webfactory/docker-composer-require-checker/blob/main/.github/workflows/build.yml βΒ in fact, we tag the Docker images with the version number of the tool (ComposerRequireChecker) included and omit the "build process" part.
Alternatively, one could tag images with two tags - one for the version of the tool included, and another one like version_of_tool-commit_sha_of_build_repo
, for those who want extra scrutinity.
from php-cs-fixer-ga.
Exactly, we need to tag specific versions, but to be honest, I am not using it anymore in my projects.
I would be happy if someone would contribute it or would take a maintainer seat next to me π
Have a good day π
from php-cs-fixer-ga.
So what are you using instead?
from php-cs-fixer-ga.
Related Issues (20)
- Can we ignore some file or folders ? HOT 1
- Manifest for oskarstark/php-cs-fixer-ga:null HOT 11
- PHP 8.3 HOT 1
- Regression in 3.26.0 update HOT 2
- Check only changed files in PR HOT 5
- ##[error]Docker run failed with exit code 1 HOT 3
- Versioning HOT 1
- Location of .php_cs HOT 9
- Integration with Prettier HOT 2
- Failure with 2.18.6 HOT 8
- 3.0.0-rc.1 failing tests HOT 1
- Look just on the pushed files HOT 3
- Finder.php error HOT 1
- Not working on ubuntu-22.04 HOT 5
- 3.9.0 released HOT 3
- Syntax issue on 3.14.2 HOT 1
- You must call one of in() or append() methods before iterating over a Finder HOT 5
- Please add tag for v3.22.0 HOT 2
- Build images for other architectures HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-cs-fixer-ga.