Skip to content

Workflow file for this run

name: Skip CI
on: [push, pull_request]
jobs:
check-ci:
runs-on: ubuntu-latest
steps:
- name: Check diff from
uses: actions/checkout@v2
with:
fetch-depth: 0
run: |
skipList=(".github/codeowners")
# Ignores changelog.md, readme.md,...
fileChangesArray=($(git diff --name-only origin/${{ github.base_ref }}..${{ github.head_ref }} | grep -v '\.md$'))
echo ${fileChangesArray}
for item in "${fileChangesArray[@]}"
do
if [[ ! " ${my_array[@]} " =~ " ${item} " ]]; then
echo "{skip_ci}=true >> $GITHUB_ENV"
exit 1
fi
done
echo "{skip_ci}=false >> $GITHUB_ENV"