summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijayakumar A <36878324+kumvijaya@users.noreply.github.com>2024-08-24 15:47:00 +0530
committerGitHub <noreply@github.com>2024-08-24 15:47:00 +0530
commita61c0e9c31b8b6513b7a2d932063957af74e4509 (patch)
treed4f03a9e2d1e88d3cdf994739ecd29dbbf29d63f
parentf8d440ddda6541faf6d9db9215e4eefd6cf3b62e (diff)
downloadvyos-workflow-test-temp-a61c0e9c31b8b6513b7a2d932063957af74e4509.tar.gz
vyos-workflow-test-temp-a61c0e9c31b8b6513b7a2d932063957af74e4509.zip
T0000: test
-rw-r--r--.github/workflows/darker-lint.yml20
1 files changed, 19 insertions, 1 deletions
diff --git a/.github/workflows/darker-lint.yml b/.github/workflows/darker-lint.yml
index b2d5d9d..4e26d45 100644
--- a/.github/workflows/darker-lint.yml
+++ b/.github/workflows/darker-lint.yml
@@ -14,10 +14,28 @@ jobs:
with:
fetch-depth: 0
- uses: actions/setup-python@v5
+
+ - name: Get head commit ID
+ id: get-head-commit
+ run: |
+ HEAD_COMMIT=$(jq -r .pull_request.head.sha "$GITHUB_EVENT_PATH")
+ echo "head_commit=$HEAD_COMMIT" >> "$GITHUB_OUTPUT"
+
+ - name: Get base commit ID
+ id: get-base-commit
+ run: |
+ BASE_COMMIT=$(jq -r .pull_request.base.sha "$GITHUB_EVENT_PATH")
+ echo "base_commit=$BASE_COMMIT" >> "$GITHUB_OUTPUT"
+
+ - name: Use commit IDs
+ run: |
+ echo "Head commit ID: ${{ steps.get-head-commit.outputs.head_commit }}"
+ echo "Base commit ID: ${{ steps.get-base-commit.outputs.base_commit }}"
+
- uses: akaihola/darker@v2.1.1
with:
options: "--check --diff --isort --color"
src: "."
version: "~=2.1.1"
lint: "flake8,pylint==2.13.1"
- revision: "current...HEAD"
+ revision: "${{ steps.get-base-commit.outputs.base_commit }}...${{ steps.get-head-commit.outputs.head_commit }}"