Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify actions to avoid processing when only doc PRs #754

Merged
merged 34 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
fe58f6e
Not process only doc PR
munapower Jan 29, 2024
4d622ed
Update paths filter version
munapower Jan 29, 2024
a39da60
Update paths filter pattern
munapower Jan 29, 2024
4eb82e1
testing github action
munapower Jan 29, 2024
f58f5b0
Add paths filter base
munapower Jan 29, 2024
74f26b0
testing github action take 2
munapower Jan 29, 2024
bad0ece
testing github action take 3
munapower Jan 29, 2024
1ce2a3c
adding workflows to not process
munapower Jan 29, 2024
20e6e85
modifying syntax
munapower Jan 29, 2024
18b3e02
modifying syntax
munapower Jan 29, 2024
f746d4d
modifying syntax
munapower Jan 29, 2024
0cdbc8e
testing with echo.go
munapower Jan 29, 2024
bb0a3e4
adding filters for actions
munapower Jan 31, 2024
18dc643
testing with echo.gov2
munapower Jan 31, 2024
7e25bc9
adding paths ignore for actions
munapower Jan 31, 2024
59f1f7b
testing with echo.gov3
munapower Jan 31, 2024
ffdab41
improving workflow
munapower Feb 6, 2024
43d2679
fixing doc workflow
munapower Feb 6, 2024
28dba86
testing readme
munapower Feb 6, 2024
c858557
testing both workflows
munapower Feb 6, 2024
50f8001
testing both workflows v2
munapower Feb 6, 2024
2210020
testing both workflows v3
munapower Feb 6, 2024
7316fe4
testing both workflows v4
munapower Feb 6, 2024
8cc7e9d
testing both workflows v5
munapower Feb 6, 2024
5e0c4cb
testing only md code
munapower Feb 19, 2024
54fb3fb
change Readme only
munapower Feb 19, 2024
6b9df0c
change for all branch
munapower Feb 19, 2024
c6aa7b4
change Readme only
munapower Feb 19, 2024
d1bb34d
change Readme and echo
munapower Feb 19, 2024
5d03c25
cleanup actions yml
munapower Feb 20, 2024
bb2291c
change only echo
munapower Feb 20, 2024
895755d
cleanup actions yml
munapower Feb 20, 2024
363071d
remove readme and echo from PR
munapower Feb 20, 2024
808a787
Update .github/workflows/documentation.yml
mbrandenburger Feb 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/documentation.yml
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

14 changes: 10 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
#

name: FPC test
on: [push, pull_request]

on:
push:
paths-ignore:
- '**.md'
- '.github/workflows/**'
pull_request:
paths-ignore:
- '**.md'
- '.github/workflows/**'
env:
DOCKER_REGISTRY: 'ghcr.io'
PUSH_TO_MAIN: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
Expand All @@ -25,13 +32,12 @@ jobs:
with:
submodules: 'recursive'

- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docker:
- 'utils/docker/**'
- name: build dev image
if: steps.filter.outputs.docker == 'true'
env:
Expand Down