Skip to content

Commit

Permalink
Update GHA to run jobs periodically (#821)
Browse files Browse the repository at this point in the history
* Update GHA to run jobs periodically

* sanity fix
  • Loading branch information
KB-perByte authored May 4, 2023
1 parent b80b7fb commit 4689ca4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@
name: Test collection

concurrency:
group: ${{ github.head_ref }}
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on: # yamllint disable-line rule:truthy
pull_request:
branches: [main]
workflow_dispatch:
schedule:
- cron: '0 0 * * *'


jobs:
ansible-lint:
uses: ansible-network/github_actions/.github/workflows/ansible-lint.yml@main
changelog:
uses: ansible-network/github_actions/.github/workflows/changelog.yml@main
if: github.event_name != 'schedule'
sanity:
uses: ansible-network/github_actions/.github/workflows/sanity.yml@main
unit-galaxy:
Expand All @@ -26,7 +30,7 @@ jobs:
git+https://github.com/ansible-collections/ansible.utils.git
git+https://github.com/ansible-collections/ansible.netcommon.git
all_green:
if: ${{ always() }}
if: ${{ always() && (github.event_name != 'schedule') }}
needs:
- ansible-lint
- changelog
Expand Down
3 changes: 3 additions & 0 deletions changelogs/fragments/add_periodic_jobs_gha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
trivial:
- Enable period test job run via Github Actions.

0 comments on commit 4689ca4

Please sign in to comment.