|
6 | 6 | paths: |
7 | 7 | - 'Dockerfile*' |
8 | 8 | - 'docker-bake.hcl' |
| 9 | + - '**.yml' |
9 | 10 | pull_request: |
10 | 11 | branches: [ master ] |
11 | 12 | paths: |
12 | 13 | - 'Dockerfile*' |
13 | 14 | - 'docker-bake.hcl' |
| 15 | + - '**.yml' |
14 | 16 | workflow_dispatch: |
15 | 17 |
|
16 | 18 | jobs: |
@@ -42,22 +44,26 @@ jobs: |
42 | 44 | - name: Test all images |
43 | 45 | if: github.event_name == 'push' && github.ref == 'refs/heads/master' |
44 | 46 | run: | |
45 | | - echo "start to test clang-tools:all" |
| 47 | + echo "start to test clang-tools images" |
| 48 | + docker images |
| 49 | +
|
46 | 50 | clang_versions="17 16 15 14 13 12 11 10 9" |
47 | 51 | for clang_version in ${clang_versions}; do |
| 52 | + echo "testing clang_version $clang_version" |
48 | 53 | docker run ghcr.io/cpp-linter/clang-tools:all clang-format-$clang_version --version | grep -E "clang-format version $clang_version" |
49 | 54 | docker run ghcr.io/cpp-linter/clang-tools:all clang-tidy-$clang_version --version | grep "LLVM version $clang_version" |
50 | 55 | done |
51 | 56 |
|
52 | 57 | all_tags="17 16 15 14 13 12 11 10 9 8 7" |
53 | 58 | for tag in ${all_tags}; do |
54 | | - echo "start to test clang-tools:tag" |
| 59 | + echo "testing clang-tools:tag" |
55 | 60 | docker run ghcr.io/cpp-linter/clang-tools:$tag clang-format --version | grep -E "clang-format version $tag" |
56 | 61 | docker run ghcr.io/cpp-linter/clang-tools:$tag clang-tidy --version | grep "LLVM version $tag" |
57 | 62 | done |
58 | | - # docker run ghcr.io/cpp-linter/clang-tools:$tag-3.18 clang-format --version | grep -E "clang-format version" |
59 | | - # docker run ghcr.io/cpp-linter/clang-tools:$tag-3.18 clang-tidy --version | grep "LLVM version" |
| 63 | + echo "testing clang-tools:16-alpine" |
| 64 | + docker run ghcr.io/cpp-linter/clang-tools:16-alpine clang-format --version | grep -E "clang-format version" |
| 65 | + docker run ghcr.io/cpp-linter/clang-tools:16-alpine clang-tidy --version | grep "LLVM version" |
60 | 66 |
|
61 | 67 | - name: Publish all images |
62 | | - if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master' |
| 68 | + if: github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' |
63 | 69 | run: docker buildx bake --file docker-bake.hcl --push |
0 commit comments