|
| 1 | +<!-- DO NOT EDIT THIS FILE! |
| 2 | +
|
| 3 | +It was automatically created by task/github-documentation-update.sh at Thu Apr 3 16:24:27 CEST 2025. |
| 4 | +--> |
| 5 | +# Github Actions templates |
| 6 | + |
| 7 | +This repository contains a number of [GitHub Actions](https://docs.github.com/en/actions) workflow template files that |
| 8 | +are copied to a project when running `itkdev-docker-compose template:install`. Any changes to the workflows should be |
| 9 | +made in [this repository](%THIS_REPOSITORY%) and then the project template must be updated to match the new templates. |
| 10 | + |
| 11 | +## Naming conventions |
| 12 | + |
| 13 | +* Named after what a tool is concerned with, not how it's concerned with it. |
| 14 | +* Some configuration based on template type (drupal, symfony) |
| 15 | + |
| 16 | +## Templates |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +[github/workflows/changelog.yaml](github/workflows/changelog.yaml) |
| 21 | + |
| 22 | +### Changelog |
| 23 | + |
| 24 | +Checks that changelog has been updated |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +[github/workflows/composer.yaml](github/workflows/composer.yaml) |
| 29 | + |
| 30 | +### Composer |
| 31 | + |
| 32 | +Validates composer.json and checks that it's normalized. |
| 33 | + |
| 34 | +#### Assumptions |
| 35 | + |
| 36 | +1. A docker compose service named `phpfpm` can be run and `composer` can be |
| 37 | + run inside the `phpfpm` service. |
| 38 | +2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize) |
| 39 | + is a dev requirement in `composer.json`: |
| 40 | + |
| 41 | + ``` shell |
| 42 | + docker compose run --rm phpfpm composer require --dev ergebnis/composer-normalize |
| 43 | + ``` |
| 44 | + |
| 45 | + Normalize `composer.json` by running |
| 46 | + |
| 47 | + ``` shell |
| 48 | + docker compose run --rm phpfpm composer normalize |
| 49 | + ``` |
| 50 | + |
| 51 | +--- |
| 52 | + |
| 53 | +[github/workflows/drupal-php.yaml](github/workflows/drupal-php.yaml) |
| 54 | + |
| 55 | +--- |
| 56 | + |
| 57 | +[github/workflows/drupal-site.yaml](github/workflows/drupal-site.yaml) |
| 58 | + |
| 59 | +### Drupal |
| 60 | + |
| 61 | +Checks that site can be installed and can be updated (from base branch on |
| 62 | +pull request). |
| 63 | + |
| 64 | +#### Assumptions |
| 65 | + |
| 66 | +1. A docker compose service named `phpfpm` can be run and `composer` can be |
| 67 | + run inside the `phpfpm` service. |
| 68 | +2. The docker setup contains a database container and other the dependent services and the |
| 69 | +3. The Drupal site can be installed from existing config. |
| 70 | + |
| 71 | +--- |
| 72 | + |
| 73 | +[github/workflows/javascript.yaml](github/workflows/javascript.yaml) |
| 74 | + |
| 75 | +--- |
| 76 | + |
| 77 | +[github/workflows/markdown.yaml](github/workflows/markdown.yaml) |
| 78 | + |
| 79 | +### Markdown |
| 80 | + |
| 81 | +Uses [itkdev/markdownlint](https://hub.docker.com/r/itkdev/markdownlint) to |
| 82 | +link all Markdown files (`**/*.md`) in the project. |
| 83 | + |
| 84 | +[markdownlint-cli configuration ### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration), |
| 85 | +`.markdownlint.jsonc` and `.markdownlintignore` control what is actually linted and how. |
| 86 | + |
| 87 | +--- |
| 88 | + |
| 89 | +[github/workflows/styles.yaml](github/workflows/styles.yaml) |
| 90 | + |
| 91 | +--- |
| 92 | + |
| 93 | +[github/workflows/symfony-php.yaml](github/workflows/symfony-php.yaml) |
| 94 | + |
| 95 | +--- |
| 96 | + |
| 97 | +[github/workflows/twig.yaml](github/workflows/twig.yaml) |
| 98 | + |
| 99 | +### Twig |
| 100 | + |
| 101 | +Validates Twig files |
| 102 | + |
| 103 | +#### Assumptions |
| 104 | + |
| 105 | +1. A docker compose service named `phpfpm` can be run and `composer` can be |
| 106 | + run inside the `phpfpm` service. |
| 107 | +2. [vincentlanglet/twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) |
| 108 | + is a dev requirement in `composer.json`: |
| 109 | + |
| 110 | + ``` shell |
| 111 | + docker compose run --rm phpfpm composer require --dev vincentlanglet/twig-cs-fixer |
| 112 | + ``` |
| 113 | + |
| 114 | +3. A [Configuration |
| 115 | + file](https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file) |
| 116 | + in the root of the project defines which files to check and rules to use. |
| 117 | + |
| 118 | +--- |
0 commit comments