summaryrefslogtreecommitdiffstats
path: root/.github/workflows/test-docker.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/test-docker.yml')
-rw-r--r--.github/workflows/test-docker.yml35
1 files changed, 20 insertions, 15 deletions
diff --git a/.github/workflows/test-docker.yml b/.github/workflows/test-docker.yml
index 073c2f2..b811c41 100644
--- a/.github/workflows/test-docker.yml
+++ b/.github/workflows/test-docker.yml
@@ -1,26 +1,30 @@
name: Test Docker
-run-name: "Test Docker (docker_tag=${{ inputs.docker_tag }}, gitlint_version=${{ inputs.gitlint_version }})"
+run-name: "Test Docker (docker_image_tag=${{ inputs.docker_image_tag }}, gitlint_version=${{ inputs.gitlint_version }})"
on:
workflow_call:
inputs:
- docker_tag:
+ 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_tag:
+ 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:
@@ -28,19 +32,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 0
- - name: Run gitlint --version using docker
+ - name: Pull gitlint docker image (jorisroovers/gitlint:${{ inputs.docker_image_tag }})
run: |
- DOCKER_TAG=${{ github.event.inputs.docker_tag }}
- GITLINT_VERSION=${{ github.event.inputs.gitlint_version }}
-
- GITLINT_CURRENT_VERSION=$(docker run --rm -v $(pwd):/repo jorisroovers/gitlint:${DOCKER_TAG} --version)
- echo "gitlint version: ${GITLINT_CURRENT_VERSION}"
-
- if [[ ! "${GITLINT_CURRENT_VERSION}" =~ "${GITLINT_VERSION}" ]]; then
- echo "Error: Expected version ${GITLINT_VERSION} != ${GITLINT_CURRENT_VERSION}"
- exit 1
- fi
+ 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 }}" ] \ No newline at end of file