Skip to content

Update docs

Update docs #1

name: "Repository Hygiene Check"
on:
push:
branches:
- 'main'
workflow_dispatch:
jobs:
check-first-run:
name: Check For First Run
runs-on: ubuntu-latest
outputs:
{% raw %}

Check failure on line 13 in .github/workflows/repoHygieneCheck.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/repoHygieneCheck.yml

Invalid workflow file

You have an error in your yaml syntax on line 13
should_run: ${{ steps.check.outputs.should_run }}
{% endraw %}
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- id: check
run: |
# If manually triggered, always run
{% raw %}
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
{% endraw %}
echo "should_run=true" >> $GITHUB_OUTPUT
exit 0
fi
# Check if initialization label exists
has_label=$(gh label list --json name | jq '.[] | select(.name=="repolinter-initialized")')
if [[ -z "$has_label" ]]; then
# First time - create label and allow run
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:
{% raw %}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
{% endraw %}
resolve-repolinter-json:
name: Get Repolinter Config
needs: check-first-run
{% raw %}
if: needs.check-first-run.outputs.should_run == 'true'
{% endraw %}
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'
repolinter-checks:
name: Tier 3 Checks
needs: [check-first-run, resolve-repolinter-json]
{% raw %}
if: needs.check-first-run.outputs.should_run == 'true'
{% endraw %}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
{% raw %}
RAW_JSON: ${{ needs.resolve-repolinter-json.outputs.raw-json }}
{% endraw %}
steps:
- uses: actions/checkout@v4
- run: echo $RAW_JSON > repolinter.json
- uses: DSACMS/repolinter-action@main
with:
config_file: 'repolinter.json'
output_type: 'pull-request'
pull_request_labels: 'repolinter-initialized, cms-oss, cms-gov'
{% raw %}
token: ${{ secrets.REPOLINTER_AUTO_TOKEN }}
{% endraw %}