blob: 16f4dafa1f03bef324180fb02f068f5076f0bec6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
name: Test Docker
run-name: "Test Docker (docker_image_tag=${{ inputs.docker_image_tag }}, gitlint_version=${{ inputs.gitlint_version }})"
on:
workflow_call:
inputs:
docker_image_tag:
description: "Docker tag to pull and run (latest, latest_dev, 0.15.0, etc)"
required: true
type: string
default: "latest"
gitlint_version:
description: "Expected gitlint version (0.15.0, etc)"
required: true
type: string
default: "0.15.0"
workflow_dispatch:
inputs:
docker_image_tag:
description: "Docker tag to pull and run (latest, latest_dev, 0.15.0, etc)"
required: true
type: string
default: "latest"
gitlint_version:
description: "Expected gitlint version (0.15.0, etc)"
required: true
type: string
default: "0.15.0"
jobs:
test-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Pull gitlint docker image (jorisroovers/gitlint:${{ inputs.docker_image_tag }})
run: |
docker pull jorisroovers/gitlint:${{ inputs.docker_image_tag }}
- name: Run gitlint --debug
run: |
docker run --ulimit nofile=1024 -v $(pwd):/repo jorisroovers/gitlint:${{ inputs.docker_image_tag }} --debug --msg-filename /repo/gitlint-core/gitlint/tests/samples/commit_message/no-violations
- name: Run gitlint --version
run: |
gitlint_version=$(docker run --ulimit nofile=1024 -v $(pwd):/repo jorisroovers/gitlint:${{ inputs.docker_image_tag }} --version)
echo "$gitlint_version == 'gitlint, version ${{ inputs.gitlint_version }}'"
[ "$gitlint_version" == "gitlint, version ${{ inputs.gitlint_version }}" ]
|