Git Product home page Git Product logo

check-commits's Introduction

check-commits composite action

This action checks a repo for recent commits.

Inputs

repo

Required The name of the repo. Defaults to ${{ github.repository }} which evaluates to the repo from which this action is used.

ref

Required SHA or branch to start listing commits from. Defaults to ${{ github.ref }} which evaluates to the branch from which this action is used.

token

Required The github api token used to access the repo. Defaults to ${{ github.token }} which evaluates to the token used by the current action. If this action is run against another private repo, use an appropriate token for access.

days-since

Required . Number of days since commits. Defaults to 1.

path

Optional . Check for commits under this path(s) instead of repo root. Defaults to repo root. Multiple paths should be separated by space. When multiple paths are specified, changes in any of the paths specified will trigger output.

Outputs

has-commits

1 if repo has commits since the given date in the given path. 0 otherwise.

Example usage

The following example shows a nightly job checking for commits since 2 days and only running the actual job if there are commits.

jobs:
  check-commits:
    runs-on: ubuntu-latest
    outputs:
      result: ${{ steps.check-commits.outputs.has-commits }}

    steps:
      - name: check commits
        uses: sirionlabs/check-commits@v1
        id: check-commits
        with:
          days-since: '2'

  nightly-build:
    needs: check-commits
    if: needs.check-commits.outputs.result == '1'

check-commits's People

Contributors

maheshunnikrishnan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.