github.com/newrelic/go-agent@v3.26.0+incompatible/.github/workflows/repolinter.yml (about)

     1  # NOTE: This file should always be named `repolinter.yml` to allow
     2  # workflow_dispatch to work properly
     3  name: Repolinter Action
     4  
     5  # NOTE: This workflow will ONLY check the default branch!
     6  # Currently there is no elegant way to specify the default
     7  # branch in the event filtering, so branches are instead
     8  # filtered in the "Test Default Branch" step.
     9  on: [push, workflow_dispatch]
    10  
    11  jobs:
    12    repolint:
    13      name: Run Repolinter
    14      runs-on: ubuntu-latest
    15      steps:
    16        - name: Test Default Branch
    17          id: default-branch
    18          uses: actions/github-script@v2
    19          with:
    20            script: |
    21              const data = await github.repos.get(context.repo)
    22              return data.data && data.data.default_branch === context.ref.split('/').slice(-1)[0]
    23        - name: Checkout Self
    24          if: ${{ steps.default-branch.outputs.result == 'true' }}
    25          uses: actions/checkout@v2
    26        - name: Run Repolinter
    27          if: ${{ steps.default-branch.outputs.result == 'true' }}
    28          uses: newrelic/repolinter-action@v1
    29          with:
    30            config_url: https://raw.githubusercontent.com/newrelic/.github/main/repolinter-rulesets/community-plus.yml
    31            output_type: issue
    32