diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a857c4d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "pip" + directory: "/tools" # Location of package manifests + schedule: + interval: "daily" \ No newline at end of file diff --git a/.github/workflows/pymarkdownlnt.yml b/.github/workflows/pymarkdownlnt.yml new file mode 100644 index 0000000..7fb2422 --- /dev/null +++ b/.github/workflows/pymarkdownlnt.yml @@ -0,0 +1,30 @@ +name: Pymarkdownlnt +# Runs the workflow on the below events: +# 1. on pull request raised to trunk branch. +# 2. on push event to trunk branch. +on: + push: + branches: + - trunk + pull_request: + branches: + - trunk + +permissions: # added using https://github.com/step-security/secure-workflows + contents: read + +jobs: + lint-markdown: + runs-on: ubuntu-latest + name: Lint Markdown + steps: + - name: Set up Python + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 + with: + python-version: 3.9 #install the python needed + - name: checkout repo content + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Install and run linter + run: |- + python3 -m pip install --require-hashes -r tools/requirements.txt + pymarkdownlnt scan */*.md diff --git a/.github/workflows/update_python_requirements.yml b/.github/workflows/update_python_requirements.yml new file mode 100644 index 0000000..3b8aabc --- /dev/null +++ b/.github/workflows/update_python_requirements.yml @@ -0,0 +1,51 @@ +name: Bump requirements.txt +on: + pull_request: + paths: + - 'tools/pyproject.toml' + workflow_dispatch: + +permissions: + pull-requests: write + +jobs: + bump_requirements: + runs-on: ubuntu-latest + + steps: + - name: Checkout this repo + if: ${{ github.actor == 'dependabot[bot]' }} + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.ref }} + token: ${{ secrets.MY_GITHUB_TOKEN }} + + - name: Set up Python + if: ${{ github.actor == 'dependabot[bot]' }} + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 + with: + python-version: '3.11' + + - name: Install Poetry + if: ${{ github.actor == 'dependabot[bot]' }} + uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439 # v3.0.0 + with: + poetry-version: '1.7.1' + + - name: Bump Python dependencies + if: ${{ github.actor == 'dependabot[bot]' }} + run: | + cd tools + poetry update + poetry export --format requirements.txt --output requirements.txt + git config --global user.name 'dependabot[bot]' + git config --global user.email 'dependabot[bot]@users.noreply.github.com' + git add requirements.txt + if [ -z "$(git status --porcelain)" ]; then + echo 'No changes to commit on this run' + exit 0 + else + git commit -m "build(deps): Bump requirements.txt" + git push + fi diff --git a/docs/OpenSSF_scorecards.md b/docs/OpenSSF_scorecards.md index f12821c..f4f5a84 100644 --- a/docs/OpenSSF_scorecards.md +++ b/docs/OpenSSF_scorecards.md @@ -6,6 +6,7 @@ we've implemented [Open Source Security Foundation Scorecards](https://securityscorecards.dev/) on key repos: + | Repo | OpenSSF scorecard | |---|---| | [at_c](https://github.com/atsign-foundation/at_c) | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/atsign-foundation/at_c/badge)](https://api.securityscorecards.dev/projects/github.com/atsign-foundation/at_c) | diff --git a/docs/atGitHub.md b/docs/atGitHub.md index 90e1c8d..d1ecb8e 100644 --- a/docs/atGitHub.md +++ b/docs/atGitHub.md @@ -138,9 +138,12 @@ to ensure that INFO level findings don't break tests. [pymarkdownlnt](https://pypi.org/project/pymarkdownlnt/). If you're working on Markdown docs then it's recommended to have pymarkdownlnt installed in a virtual environment. +[This post](https://blog.thestateofme.com/2024/02/16/linting-markdown-with-pymarkdownlnt/) +provides details on setting things up. * Python (and MicroPython) use either [Flake8](https://flake8.pycqa.org/en/latest/) or [Ruff](https://docs.astral.sh/ruff/) +* Rust uses [clippy](https://github.com/rust-lang/rust-clippy) ### Continuous Delivery diff --git a/profile/README.md b/profile/README.md index 7e92424..2dbf3df 100644 --- a/profile/README.md +++ b/profile/README.md @@ -1,3 +1,4 @@ +