diff --git a/.github/required.yml b/.github/required.yml index 60f66d3..b6a1d43 100644 --- a/.github/required.yml +++ b/.github/required.yml @@ -13,7 +13,9 @@ on: jobs: success: - if: contains(fromJSON('["merge_group", "pull_request"]'), github.event.workflow_run.event) + if: + contains(fromJSON('["merge_group", "pull_request"]'), + github.event.workflow_run.event) name: Create appropriate status runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index 736f27b..e991f7b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,34 @@ # Required workflows Configure required workflows in your repository. Use path filters. Be free. + +## Usage + +``` +name: Required + +on: + workflow_run: + workflows: + - Check Transpiled JavaScript + - Continuous Integration + - Lint Codebase + types: + - completed + +jobs: + success: + if: contains(fromJSON('["merge_group", "pull_request"]'), github.event.workflow_run.event) + name: Create appropriate status + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./ + with: + token: ${{ secrets.GITHUB_TOKEN }} + status-name: Required + must-succeed-if-run: | + Check Transpiled JavaScript + Continuous Integration + Lint Codebase +```