Skip to content

Commit

Permalink
Issue postgres-plr#111 Figure out how to not-do-CI for non code changes
Browse files Browse the repository at this point in the history
postgres-plr#111

REMOVED BODY
  • Loading branch information
AndreMikulec committed May 28, 2021
1 parent 1689332 commit 3239589
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 3239589

Please sign in to comment.