From 6f6722e969067d03521af5f05097b3a3a0238558 Mon Sep 17 00:00:00 2001 From: Oleg A Date: Sun, 27 Aug 2023 14:47:12 +0300 Subject: [PATCH 1/4] chore: use pre-job to skip duplicates #25 --- .github/workflows/linters.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index a223bc8..c90e78c 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -4,7 +4,21 @@ on: [ push, pull_request ] jobs: + pre_job: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@v5 + with: + skip_after_successful_duplicate: 'true' + do_not_skip: '["pull_request"]' + + black: + needs: pre_job + if: needs.pre_job.outputs.should_skip != 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -13,6 +27,8 @@ jobs: options: "--check --verbose" ruff: + needs: pre_job + if: needs.pre_job.outputs.should_skip != 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -21,6 +37,8 @@ jobs: src: './yatracker' mypy: + needs: pre_job + if: needs.pre_job.outputs.should_skip != 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 92c7e2130e72a77ab7455225f3479fcfc74bebfa Mon Sep 17 00:00:00 2001 From: Oleg A Date: Sun, 27 Aug 2023 14:50:31 +0300 Subject: [PATCH 2/4] chore: set default options to skip #25 --- .github/workflows/linters.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index c90e78c..8de7fcd 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -11,10 +11,6 @@ jobs: steps: - id: skip_check uses: fkirc/skip-duplicate-actions@v5 - with: - skip_after_successful_duplicate: 'true' - do_not_skip: '["pull_request"]' - black: needs: pre_job From d220685410091b2b7d05de2819a6952b857fe2ad Mon Sep 17 00:00:00 2001 From: Oleg A Date: Sun, 27 Aug 2023 14:55:23 +0300 Subject: [PATCH 3/4] chore: try without pre-job #25 --- .github/workflows/linters.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 8de7fcd..902ae48 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -1,20 +1,14 @@ name: Linters -on: [ push, pull_request ] +on: + pull_request: + push: + branches: + - master -jobs: - - pre_job: - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@v5 +jobs: black: - needs: pre_job - if: needs.pre_job.outputs.should_skip != 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -23,8 +17,6 @@ jobs: options: "--check --verbose" ruff: - needs: pre_job - if: needs.pre_job.outputs.should_skip != 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -33,8 +25,6 @@ jobs: src: './yatracker' mypy: - needs: pre_job - if: needs.pre_job.outputs.should_skip != 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 5f151b277660501928626c6bdfc246afb8eea924 Mon Sep 17 00:00:00 2001 From: Oleg A Date: Sun, 27 Aug 2023 14:58:49 +0300 Subject: [PATCH 4/4] chore: support feature braches #25 --- .github/workflows/linters.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 902ae48..e7c8b62 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -1,11 +1,13 @@ name: Linters on: - pull_request: push: branches: - master - + - feature/* + pull_request: + branches: + - master jobs: black: