From 4356caa1e48f6977bb3519dbeaef445500474ace Mon Sep 17 00:00:00 2001 From: Nandu-pns Date: Tue, 30 Apr 2024 11:49:51 +0530 Subject: [PATCH] chore: Add Repolinter workflow action --- .github/workflows/repolinter.yml | 31 +++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/repolinter.yml diff --git a/.github/workflows/repolinter.yml b/.github/workflows/repolinter.yml new file mode 100644 index 0000000..62d5333 --- /dev/null +++ b/.github/workflows/repolinter.yml @@ -0,0 +1,31 @@ +# 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] + +jobs: + repolint: + name: Run Repolinter + runs-on: ubuntu-latest + steps: + - name: Test Default Branch + id: default-branch + uses: actions/github-script@v6 + 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@v3 + - name: Run Repolinter + if: ${{ steps.default-branch.outputs.result == 'true' }} + uses: newrelic/repolinter-action@v1 + with: + config_url: https://raw.githubusercontent.com/newrelic/.github/main/repolinter-rulesets/community-project.yml + output_type: issue \ No newline at end of file diff --git a/README.md b/README.md index 9abc945..edbdd8e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Community Project header](https://github.com/newrelic/open-source-office/raw/master/examples/categories/images/Community_Project.png)](https://github.com/newrelic/open-source-office/blob/master/examples/categories/index.md#category-community-project) + # ansible-runner This creates a docker image of Ansible. The installation steps are taken from the Ansible documentation https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html using pipx.