-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify actions to avoid processing when only doc PRs (#754)
- Update paths filter to recent version - Avoid running FPC test when only changes to markdown files (docu updates) - Add new workflow for documentation --------- Signed-off-by: munapower <mmunaro@hotmail.com> Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com> Co-authored-by: Marcus Brandenburger <bur@zurich.ibm.com>
- Loading branch information
1 parent
e0eb483
commit 4d8f776
Showing
2 changed files
with
51 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
name: Check Documentation | ||
on: | ||
push: | ||
paths: | ||
- '**.md' | ||
defaults: | ||
run: | ||
shell: bash | ||
permissions: {} | ||
jobs: | ||
check-md-only: | ||
name: This job was triggered | ||
runs-on: ubuntu-latest | ||
outputs: | ||
md-only: ${{ steps.test-md-only.outputs.md-only }} | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 # required to compare HEAD^ | ||
- run: git diff --name-only HEAD^..HEAD | ||
- name: Test MD only | ||
id: test-md-only | ||
run: >- | ||
[ -z "$(git diff --name-only HEAD^..HEAD | grep -ve "\.md$")" ] && | ||
echo "md-only=${{toJSON(true)}}" >> $GITHUB_OUTPUT || | ||
echo "md-only=${{toJSON(false)}}" >> $GITHUB_OUTPUT | ||
build: | ||
name: Run if only MD files | ||
needs: ['check-md-only'] | ||
runs-on: ubuntu-latest | ||
if: ${{ fromJSON(needs.check-md-only.outputs.md-only) == true }} | ||
steps: | ||
- run: echo ran | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters