From 472025a10060f621d1aab2101ff2a0567582768b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20L=C3=B6sche?= Date: Tue, 5 Mar 2024 17:34:45 +0100 Subject: [PATCH] Add Github workflow --- .github/CODEOWNERS | 1 + .github/ISSUE_TEMPLATE/bug.yml | 55 +++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 ++++ .github/ISSUE_TEMPLATE/enhancement.yml | 31 ++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 24 +++++++++++ .github/workflows/fixcompliance.yml | 57 ++++++++++++++++++++++++++ 6 files changed, 176 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/bug.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/enhancement.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/fixcompliance.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..97fb425 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @lloesche @aquamatthias @meln1k diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..f9ca5d3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,55 @@ +name: 🐛 Bug Report +description: Report a problem +labels: ['bug'] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: textarea + id: description + attributes: + label: Description + description: Please provide a clear and concise description of the bug or issue. + validations: + required: true + - type: input + id: version + attributes: + label: Version + description: What version of Fix Inventory are you running? + validations: + required: true + - type: input + id: environment + attributes: + label: Environment + description: + validations: + required: false + - type: textarea + id: repro-steps + attributes: + label: Steps to Reproduce + description: Please tell us how we can reproduce the undesired behavior. + placeholder: | + 1. + 2. + 3. + validations: + required: false + - type: textarea + id: logs + attributes: + label: Logs + description: Please copy and paste any relevant log output. (This will be automatically formatted into code, so no need for backticks.) + render: shell + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: Provide any additional information or screenshots that may be relevant or helpful. + - type: markdown + attributes: + value: | + By submitting this bug report, I agree to follow the [code of conduct](https://inventory.fix.security/code-of-conduct). diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..10babd3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: 💬 Discord + url: https://discord.gg/someengineering + about: Chat with other users and the development team + - name: 📄 Documentation + url: https://inventory.fix.security/docs + about: Read and search documentation diff --git a/.github/ISSUE_TEMPLATE/enhancement.yml b/.github/ISSUE_TEMPLATE/enhancement.yml new file mode 100644 index 0000000..cce7b06 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.yml @@ -0,0 +1,31 @@ +name: ✨ Feature Request +description: Suggest an idea +labels: ['enhancement'] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this feature request! + - type: textarea + id: motivation + attributes: + label: Motivation + description: Please provide a clear and concise description of the rationale behind this request. + validations: + required: true + - type: textarea + id: desired-behavior + attributes: + label: Desired Behavior + description: Provide a clear and concise description of what you want to happen. + validations: + required: true + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: Provide any additional information or screenshots that may be relevant or helpful. + - type: markdown + attributes: + value: | + By submitting this feature request, I agree to follow the [code of conduct](https://inventory.fix.security/code-of-conduct). diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..2b9ca82 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,24 @@ +# Description + + + +# To-Dos + + + + + +- [ ] Add test coverage for new or updated functionality +- [ ] Lint and test with `tox` +- [ ] Document new or updated functionality (someengineering/inventory.fix.security#XXXX) + +# Issues Fixed + + + + +- Fixes #XXXX + +# Code of Conduct + +By submitting this pull request, I agree to follow the [code of conduct](https://inventory.fix.security/code-of-conduct). diff --git a/.github/workflows/fixcompliance.yml b/.github/workflows/fixcompliance.yml new file mode 100644 index 0000000..7898d99 --- /dev/null +++ b/.github/workflows/fixcompliance.yml @@ -0,0 +1,57 @@ +name: fixcompliance +on: + push: + tags: + - "*.*.*" + branches: + - main + pull_request: + paths: + - 'fixcompliance/**' + - '.github/**' + +jobs: + fixinventorydata: + name: "fixcompliance" + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.11' + architecture: 'x64' + + - name: Restore dependency cache + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: $\{\{runner.os}}-pip-$\{\{hashFiles('setup.py')}} + restore-keys: | + $\{\{ runner.os }}-pip- + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install tox wheel flake8 build + + - name: Run tests + run: tox + + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + + - name: Publish distribution to PyPI + if: github.ref_type == 'tag' + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_FIXCOMPLIANCE }} + packages_dir: ./dist/