Skip to content

πŸŒ“ GitHub action that checks for changes between nightly CI jobs

License

Notifications You must be signed in to change notification settings

lukecarr/nightly-check

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŒ“ GitHub action that checks for changes between nightly CI jobs

Example Usage

name: "Nightly Build"

on:
  schedule:
    - cron: "0 2 * * *"

jobs:
  check:
    runs-on: ubuntu-latest
    outputs:
      changes: ${{ steps.nightly-check.outputs.changes }}
    steps:
      - id: nightly-check
        name: Check for changes since last nightly
        uses: lukecarr/nightly-check@v0.2.0

  nightly:
    runs-on: ubuntu-latest
    needs: check
    if: ${{ needs.check.outputs.changes == 'false' }}
    steps:        
      # ... your steps here

In the above example, we declare the check job which runs this action. The nightly job will then subsequently run if no changes have been made to the repository in the past 24 hours.

Custom duration

If you want to look for changes within a duration different to the default (24 hours), you can configure the within input parameter in the action:

...

jobs:
  check:
    runs-on: ubuntu-latest
    outputs:
      changes: ${{ steps.nightly-check.outputs.changes }}
    steps:
      - id: nightly-check
        name: Check for changes in the last two days
        uses: lukecarr/nightly-check@v0.2.0
        with:
          within: 48 hrs
...

Contributors

Thanks goes to these wonderful people (emoji key):

Luke Carr
Luke Carr

πŸ’» πŸ“–
Y.C.Huang
Y.C.Huang

πŸ›

This project follows the all-contributors specification. Contributions of any kind welcome!

About

πŸŒ“ GitHub action that checks for changes between nightly CI jobs

Topics

Resources

License

Stars

Watchers

Forks