diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e6fa09a6..7a43aef7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,14 +8,19 @@ on: - '**' - '!dev' pull_request: - branches: - - '**' + types: [opened, synchronize, reopened, labeled] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true jobs: build: # Verify we can build on latest Ubuntu with both gcc and clang name: ${{ matrix.compiler }} runs-on: ubuntu-latest + # Skip redundant builds for PRs - prefer PR builds over push builds + if: github.event_name != 'push' || github.ref == 'refs/heads/master' strategy: matrix: compiler: [gcc, clang] diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8a4fa628..f4d164d0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,12 +2,15 @@ name: Dotty the Documenteer on: push: + branches: + - master paths: - 'doc/**' - 'README.md' - 'mkdocs.yml' - '.github/workflows/docs.yml' pull_request: + types: [opened, synchronize, reopened, labeled] paths: - 'doc/**' - 'README.md'