Skip to content

changed filename

changed filename #1

name: "Repository Hygiene Check"
on:
push:
branches:
-main
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
initial-check:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.check-label.outputs.should_run }}
steps:
- uses: actions/checkout@v4
- id: check-label
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "should_run=true" >> $GITHUB_OUTPUT
exit 0
fi
if ! gh label list --json name | jq -e '.[] | select(.name=="repolinter-initialized")' > /dev/null; then
gh label create repolinter-initialized --description "Marks repo as having run initial repolinter check"
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_OUTPUT
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
repolinter:
needs: initial-check
if: needs.initial-check.outputs.should_run == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get Repolinter Config
id: config
uses: DSACMS/repo-scaffolder/.github/workflows/extendJSONFile.yml@main
with:
url_to_json: 'https://raw.githubusercontent.com/DSACMS/repo-scaffolder/main/tier3/%7B%7Bcookiecutter.project_slug%7D%7D/repolinter.json'
- name: Save Config
run: echo '${{ steps.config.outputs.raw-json }}' > repolinter.json
- name: Run Checks
uses: DSACMS/repolinter-action@main
with:
config_file: repolinter.json
output_type: pull-request
pull_request_labels: repolinter-initialized, cms-oss, cms-gov
token: ${{ secrets.REPOLINTER_AUTO_TOKEN }}