Merge pull request #2230 from newrelic/pyoo-muh #5242
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: This file should always be named `repolinter.yml` to allow | |
# workflow_dispatch to work properly | |
name: Repolinter Action | |
# NOTE: This workflow will ONLY check the default branch! | |
# Currently there is no elegant way to specify the default | |
# branch in the event filtering, so branches are instead | |
# filtered in the "Test Default Branch" step. | |
on: [push, workflow_dispatch] | |
permissions: | |
# Needed to create issues with the failed checks | |
issues: write | |
jobs: | |
repolint: | |
name: Run Repolinter | |
runs-on: ubuntu-latest | |
steps: | |
- name: Test Default Branch | |
id: default-branch | |
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # tag v6.4.1 | |
with: | |
script: | | |
const data = await github.rest.repos.get(context.repo) | |
return data.data && data.data.default_branch === context.ref.split('/').slice(-1)[0] | |
- name: Checkout Self | |
if: ${{ steps.default-branch.outputs.result == 'true' }} | |
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # tag v3.5.0 | |
- name: Run Repolinter | |
if: ${{ steps.default-branch.outputs.result == 'true' }} | |
uses: newrelic/repolinter-action@3f4448f855c351e9695b24524a4111c7847b84cb # tag v1.7.0 | |
with: | |
config_url: https://raw.githubusercontent.com/newrelic/.github/main/repolinter-rulesets/community-plus.yml | |
output_type: issue |