Skip to content

Commit

Permalink
chore: refine paths-ignore for all GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed Jul 1, 2023
1 parent dafe46d commit 2f8dfe5
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 32 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ on:
- 1.x
paths-ignore:
- '**.md'
- '**.yml'
- '**.yaml'
- '!.github/workflows/codeql.yml'
pull_request:
branches:
- master
- dev
- 1.x
paths-ignore:
- '**.md'
- '**.yml'
- '**.yaml'
- '!.github/workflows/codeql.yml'
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check pull request target
on:
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- master
jobs:
check-branches:
runs-on: ubuntu-latest
steps:
- name: Check target branch
run: |
if [ ${{ github.head_ref }} != "dev" ]; then
echo "Only pull requests from dev branch are only allowed to be merged into master branch."
exit 1
fi
File renamed without changes.
14 changes: 6 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,19 @@ on:
- 1.x
paths-ignore:
- '**.md'
- '.github/FUNDING.yml'
- '.github/release-drafter.yml'
- '.github/ISSUE_TEMPLATE/*'
- '.github/workflows/release-drafter.yaml'
- '**.yml'
- '**.yaml'
- '!.github/workflows/test.yml'
pull_request:
branches:
- master
- dev
- 1.x
paths-ignore:
- '**.md'
- '.github/FUNDING.yml'
- '.github/release-drafter.yml'
- '.github/ISSUE_TEMPLATE/*'
- '.github/workflows/release-drafter.yaml'
- '**.yml'
- '**.yaml'
- '!.github/workflows/test.yml'

env:
GO111MODULE: on
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/test_gc_opt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,19 @@ on:
- 1.x
paths-ignore:
- '**.md'
- '.github/FUNDING.yml'
- '.github/release-drafter.yml'
- '.github/ISSUE_TEMPLATE/*'
- '.github/workflows/release-drafter.yaml'
- '**.yml'
- '**.yaml'
- '!.github/workflows/test_gc_opt.yml'
pull_request:
branches:
- master
- dev
- 1.x
paths-ignore:
- '**.md'
- '.github/FUNDING.yml'
- '.github/release-drafter.yml'
- '.github/ISSUE_TEMPLATE/*'
- '.github/workflows/release-drafter.yaml'
- '**.yml'
- '**.yaml'
- '!.github/workflows/test_gc_opt.yml'

env:
GO111MODULE: on
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/test_poll_opt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,19 @@ on:
- 1.x
paths-ignore:
- '**.md'
- '.github/FUNDING.yml'
- '.github/release-drafter.yml'
- '.github/ISSUE_TEMPLATE/*'
- '.github/workflows/release-drafter.yaml'
- '**.yml'
- '**.yaml'
- '!.github/workflows/test_poll_opt.yml'
pull_request:
branches:
- master
- dev
- 1.x
paths-ignore:
- '**.md'
- '.github/FUNDING.yml'
- '.github/release-drafter.yml'
- '.github/ISSUE_TEMPLATE/*'
- '.github/workflows/release-drafter.yaml'
- '**.yml'
- '**.yaml'
- '!.github/workflows/test_poll_opt.yml'

env:
GO111MODULE: on
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/test_poll_opt_gc_opt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,19 @@ on:
- 1.x
paths-ignore:
- '**.md'
- '.github/FUNDING.yml'
- '.github/release-drafter.yml'
- '.github/ISSUE_TEMPLATE/*'
- '.github/workflows/release-drafter.yaml'
- '**.yml'
- '**.yaml'
- '!.github/workflows/test_poll_opt_gc_opt.yml'
pull_request:
branches:
- master
- dev
- 1.x
paths-ignore:
- '**.md'
- '.github/FUNDING.yml'
- '.github/release-drafter.yml'
- '.github/ISSUE_TEMPLATE/*'
- '.github/workflows/release-drafter.yaml'
- '**.yml'
- '**.yaml'
- '!.github/workflows/test_poll_opt_gc_opt.yml'

env:
GO111MODULE: on
Expand Down

0 comments on commit 2f8dfe5

Please sign in to comment.