Skip to content

Commit 8985de3

Browse files
committed
More clean up
1 parent c26f25a commit 8985de3

File tree

32 files changed

+74
-60
lines changed

32 files changed

+74
-60
lines changed

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
version: '3'
44

55
includes:
6-
github-actions: ./task/Tasfile.github-actions.yml
6+
github-actions: ./task/Taskfile.github-actions.yml
77

88
vars:
99
GITHUB_ACTIONS_TEMPLATES_HEADER: |

config/drupal/twig/.twig-cs-fixer.dist.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22
// https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file
33

44
$finder = new TwigCsFixer\File\Finder();
5-
6-
if (glob('web/*/custom/*/templates')) {
7-
$finder->in('web/*/custom/*/templates');
8-
}
9-
// Include sub-modules or sub-themes
10-
if (glob('web/*/custom/*/*/templates')) {
11-
$finder->in('web/*/custom/*/*/templates');
12-
}
5+
// Check all files …
6+
$finder->in(__DIR__);
7+
// … that are not ignored by VSC
8+
$finder->ignoreVCSIgnored(true);
139

1410
$config = new TwigCsFixer\Config\Config();
1511
$config->setFinder($finder);

config/symfony/twig/.twig-cs-fixer.dist.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
// https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file
33

44
$finder = new TwigCsFixer\File\Finder();
5-
$finder->in('templates');
5+
// Check all files …
6+
$finder->in(__DIR__);
7+
// … that are not ignored by VSC
8+
$finder->ignoreVCSIgnored(true);
69

710
$config = new TwigCsFixer\Config\Config();
811
$config->setFinder($finder);

docs/github-actions-templates.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- DO NOT EDIT THIS FILE!
22
3-
It was automatically created by task/github-documentation-update.sh at Fri Apr 4 13:49:36 CEST 2025.
3+
It was automatically created by task/scripts/github-documentation-update at Tue Apr 8 10:02:13 CEST 2025.
44
-->
55
# Github Actions templates
66

@@ -51,13 +51,13 @@ Validates composer.json and checks that it's normalized.
5151

5252
---
5353

54-
[github/workflows/drupal-php.yaml](github/workflows/drupal-php.yaml)
54+
[github/workflows/drupal/php.yaml](github/workflows/drupal/php.yaml)
5555

5656
Drupal PHP
5757

5858
---
5959

60-
[github/workflows/drupal-site.yaml](github/workflows/drupal-site.yaml)
60+
[github/workflows/drupal/site.yaml](github/workflows/drupal/site.yaml)
6161

6262
### Drupal
6363

@@ -97,15 +97,15 @@ Styles (CSS and SCSS)
9797

9898
---
9999

100-
[github/workflows/symfony-php.yaml](github/workflows/symfony-php.yaml)
100+
[github/workflows/symfony/php.yaml](github/workflows/symfony/php.yaml)
101101

102102
Symfony PHP
103103

104104
---
105105

106106
[github/workflows/twig.yaml](github/workflows/twig.yaml)
107107

108-
### Twigt
108+
### Twig
109109

110110
Validates Twig files
111111

File renamed without changes.
File renamed without changes.
File renamed without changes.

github/workflows/twig.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# github/workflows/twig.yaml in
33
# https://github.com/itk-dev/devops_itkdev-docker if need be.
44

5-
### ### Twigt
5+
### ### Twig
66
###
77
### Validates Twig files
88
###

task/Tasfile.github-actions.yml renamed to task/Taskfile.github-actions.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ tasks:
66
cmds:
77
- task: run-script
88
vars:
9-
SCRIPT: task/github-documentation-update.sh
9+
SCRIPT: github-documentation-update
1010
- SKIP_FIX=1 task lint:markdown -- docs/github-actions-templates.md
1111

1212
documentation:diff:
@@ -45,7 +45,7 @@ tasks:
4545
if [[ $(head --lines=1 "$f") =~ "^# " ]]; then
4646
# … replace the header.
4747
# This is done by deleting all lines from the top of the file to a blank line.
48-
docker run --rm --volume=$PWD:/app --user ${COMPOSE_USER:-deploy} itkdev/php8.3-fpm:latest sed -i '1,/^$/d' "$f"
48+
docker run --rm --volume=$PWD:/app --user ${COMPOSE_USER:-deploy} itkdev/php8.4-fpm:latest sed -i '1,/^$/d' "$f"
4949
fi
5050
5151
# Write header and file into temporary file.
@@ -66,7 +66,7 @@ tasks:
6666
cmds:
6767
- task: run-script
6868
vars:
69-
SCRIPT: task/github-actions-link.sh
69+
SCRIPT: github-actions-link
7070
silent: true
7171

7272
show:
@@ -78,7 +78,7 @@ tasks:
7878
run-script:
7979
internal: true
8080
cmds:
81-
- docker run --rm --volume "$PWD:/app" --user ${COMPOSE_USER:-deploy} itkdev/php8.3-fpm:latest {{.SCRIPT}}
81+
- docker run --rm --volume "$PWD:/app" --user ${COMPOSE_USER:-deploy} itkdev/php8.4-fpm:latest task/scripts/{{.SCRIPT}}
8282
requires:
8383
vars:
8484
- SCRIPT
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- DO NOT EDIT THIS FILE!
2+
3+
It was automatically created by task/scripts/github-documentation-update.sh at Tue Apr 8 09:33:44 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](https://github.com/itk-dev/devops_itkdev-docker) and then the project template must be updated
10+
to match the new templates.
11+
12+
## Naming conventions
13+
14+
* Named after what a tool is concerned with, not how it's concerned with it.
15+
* Some configuration based on template type (drupal, symfony)
16+
17+
## Templates
18+
19+
---
20+
21+
[github/workflows/*.yaml](github/workflows/*.yaml)
22+
23+
24+
---

0 commit comments

Comments
 (0)