From e6b78c3dc427885f688293641ed4473f2151de54 Mon Sep 17 00:00:00 2001 From: Paul Horton Date: Mon, 14 Oct 2024 09:56:38 +0100 Subject: [PATCH] feat: add workflow to run process Signed-off-by: Paul Horton --- .github/workflows/apply-standards.yaml | 36 ++++++++++++++++++++++++++ README.md | 4 +-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/apply-standards.yaml diff --git a/.github/workflows/apply-standards.yaml b/.github/workflows/apply-standards.yaml new file mode 100644 index 0000000..f04178e --- /dev/null +++ b/.github/workflows/apply-standards.yaml @@ -0,0 +1,36 @@ +name: Enforce Standards + +on: + workflow_dispatch: + +jobs: + enforce-standards: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Configure Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install poetry + # see https://github.com/marketplace/actions/setup-poetry + uses: Gr1N/setup-poetry@v9 + with: + poetry-version: ${{ env.POETRY_VERSION }} + + - name: Install dependencies + run: poetry install --no-root + + - name: Apply Standards + run: python -m github_standards > output.txt + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + + - name: Save Run Output + uses: actions/upload-artifact@v4 + with: + name: apply-standards-log + path: output.txt diff --git a/README.md b/README.md index 2fd2e85..e05e607 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,8 @@ This project is part of the [Sonatype Nexus Community](https://github.com/sonaty Last but not least of all - have fun! -[shield_gh-workflow-test]: https://img.shields.io/github/actions/workflow/status/sonatype-nexus-community/github-management/test.yml?branch=main&logo=GitHub&logoColor=white "build" +[shield_gh-workflow-test]: https://img.shields.io/github/actions/workflow/status/sonatype-nexus-community/github-management/apply-standards.yaml?branch=main&logo=GitHub&logoColor=white "build" [shield_license]: https://img.shields.io/github/license/sonatype-nexus-community/github-management?logo=open%20source%20initiative&logoColor=white "license" -[link_gh-workflow-test]: https://github.com/sonatype-nexus-community/github-management/actions/workflows/test.yml?query=branch%3Amain +[link_gh-workflow-test]: https://github.com/sonatype-nexus-community/github-management/actions/workflows/apply-standards.yaml?query=branch%3Amain [license_file]: https://github.com/sonatype-nexus-community/github-management/blob/main/LICENSE \ No newline at end of file