Skip to content

Commit

Permalink
run tests only on pushes to master or to PRs (#581)
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
  • Loading branch information
rndmh3ro authored Sep 28, 2022
1 parent 64b5d82 commit 44489de
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
---
name: Ansible Lint # feel free to pick your own name

on: [push, pull_request] # yamllint disable-line rule:truthy
on: # yamllint disable-line rule:truthy
# Run CI against all pushes (direct commits, also merged PRs), Pull Requests
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]

jobs:
ansible-lint:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/mysql_hardening.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
---
name: "devsec.mysql_hardening"

on: # yamllint disable-line rule:truthy
workflow_dispatch:
push:
branches: [master]
paths:
- 'roles/mysql_hardening/**'
- 'molecule/mysql_hardening/**'
- '.github/workflows/mysql_hardening.yml'
pull_request:
branches: [master]
paths:
- 'roles/mysql_hardening/**'
- 'molecule/mysql_hardening/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/nginx_hardening.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ name: "devsec.nginx_hardening"
on: # yamllint disable-line rule:truthy
workflow_dispatch:
push:
branches: [master]
paths:
- 'roles/nginx_hardening/**'
- 'molecule/nginx_hardening/**'
- '.github/workflows/nginx_hardening.yml'
pull_request:
branches: [master]
paths:
- 'roles/nginx_hardening/**'
- 'molecule/nginx_hardening/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/os_hardening.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ name: "devsec.os_hardening"
on: # yamllint disable-line rule:truthy
workflow_dispatch:
push:
branches: [master]
paths:
- 'roles/os_hardening/**'
- 'molecule/os_hardening/**'
- '.github/workflows/os_hardening.yml'
pull_request:
branches: [master]
paths:
- 'roles/os_hardening/**'
- 'molecule/os_hardening/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/os_hardening_vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ name: "devsec.os_hardening VM"
on: # yamllint disable-line rule:truthy
workflow_dispatch:
push:
branches: [master]
paths:
- 'roles/os_hardening/**'
- 'molecule/os_hardening_vm/**'
- '.github/workflows/os_hardening_vm.yml'
pull_request:
branches: [master]
paths:
- 'roles/os_hardening/**'
- 'molecule/os_hardening_vm/**'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/prettier-md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: Prettier markdown files

on: # yamllint disable-line rule:truthy
push:
branches: [master]
paths:
- '**.md'

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ssh_hardening.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ name: "devsec.ssh_hardening"
on: # yamllint disable-line rule:truthy
workflow_dispatch:
push:
branches: [master]
paths:
- 'roles/ssh_hardening/**'
- 'molecule/ssh_hardening/**'
- '.github/workflows/ssh_hardening.yml'
pull_request:
branches: [master]
paths:
- 'roles/ssh_hardening/**'
- 'molecule/ssh_hardening/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ssh_hardening_custom_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ name: "devsec.ssh_hardening with custom tests"
on: # yamllint disable-line rule:truthy
workflow_dispatch:
push:
branches: [master]
paths:
- 'roles/ssh_hardening/**'
- 'molecule/ssh_hardening_custom_tests/**'
- '.github/workflows/ssh_hardening_custom_tests.yml'
pull_request:
branches: [master]
paths:
- 'roles/ssh_hardening/**'
- 'molecule/ssh_hardening_custom_tests/**'
Expand Down

0 comments on commit 44489de

Please sign in to comment.