diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7e308f3e..924b7700 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,23 @@ name: plr CI -on: [push, pull_request] +on: + pull_request: + paths-ignore: + # When using the push and pull_request events, + # you can, configure a workflow to run, when at least one file does not match + # paths-ignore, or at least one modified file matches the configured paths. + - '**/*.md' + push: + paths-ignore: + - '**/*.md' jobs: master: runs-on: ubuntu-latest + # not restricted to specific Webhook event payloads (of "push" and "pull_request") + # just check the latest commit + if: | + !contains(github.event.head_commit.message, '[skip ci]') && + !contains(github.event.head_commit.message, '[skip actions]') && + !contains(github.event.head_commit.message, '[skip github actions]') steps: - name: Echo site details run: echo building master @@ -45,6 +60,12 @@ jobs: build: runs-on: ubuntu-latest + # not restricted to specific Webhook event payloads (of "push" and "pull_request") + # just check the latest commit + if: | + !contains(github.event.head_commit.message, '[skip ci]') && + !contains(github.event.head_commit.message, '[skip actions]') && + !contains(github.event.head_commit.message, '[skip github actions]') env: PG: ${{ matrix.pg }} strategy: diff --git a/.travis.yml b/.travis.yml index c8ba591c..7f923110 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,13 @@ env: - PG=9.5 before_script: + # creates a diff of all commits and exits the build if it only includes markdown files + - | + if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(.md$)' + then + echo "Only doc files were updated, not running the CI." + exit + fi - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - - sudo apt-get update -qq diff --git a/appveyor.yml b/appveyor.yml index dc94d35d..d3093d4d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,3 +1,12 @@ + +# Skipping commits affecting specific files (GitHub and Bitbucket only). +skip_commits: + files: + # skipping AppVeyor build if, in the push’s head commit, all of the files + # have the extension .md + - '**/*.md' + + image: Visual Studio 2015 configuration: Release platform: x64