From b2ff5888136e204614f51c8e82468456c84d1903 Mon Sep 17 00:00:00 2001 From: Maxim Martynov Date: Wed, 28 Jul 2021 21:40:02 +0300 Subject: [PATCH 1/2] Allow Github Actions to be run on non-master branch --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ab4573..139ced7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,8 +3,6 @@ name: build on: push: - branches: - - master pull_request: branches: - master From 58c72752aa47bc9c66725f0b07b036b362e5e14f Mon Sep 17 00:00:00 2001 From: Maxim Martynov Date: Thu, 12 Aug 2021 18:04:23 +0300 Subject: [PATCH 2/2] Use fkirc/skip-duplicate-actions action in workflow --- .github/workflows/build.yml | 21 +++++++++++++++++++++ .gitignore | 1 + 2 files changed, 22 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 139ced7..4f1e6b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,9 +11,28 @@ on: - cron: "0 5 * * 6" # 5:00 UTC every Saturday jobs: + check_duplicate_runs: + name: Check for duplicate runs + continue-on-error: true + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + concurrent_skipping: same_content + cancel_others: true + skip_after_successful_duplicate: false + paths_ignore: '["**/README.rst", "**/CHANGES.rst", "**/HACKING.rst", "**/LICENSE"]' + do_not_skip: '["pull_request"]' + build: name: Python ${{ matrix.python-version }} runs-on: ubuntu-latest + needs: check_duplicate_runs + if: ${{ needs.check_duplicate_runs.outputs.should_skip != 'true' }} strategy: matrix: @@ -67,7 +86,9 @@ jobs: lint: name: ${{ matrix.toxenv }} + needs: check_duplicate_runs runs-on: ubuntu-latest + if: ${{ needs.check_duplicate_runs.outputs.should_skip != 'true' }} strategy: matrix: diff --git a/.gitignore b/.gitignore index 7021a31..195e1e8 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ __pycache__/ .cache *.DS_Store venv/ +.vscode