diff --git a/.github/.mega-linter.yaml b/.github/.mega-linter.yaml deleted file mode 100644 index 07be5e1..0000000 --- a/.github/.mega-linter.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/megalinter/megalinter/main/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json -# ref: - -EXTENDS: - - https://github.com/liblaf/repo/raw/refs/heads/main/.github/linters/.mega-linter.yaml diff --git a/.github/renovate.json b/.github/renovate.json deleted file mode 100644 index ce607d0..0000000 --- a/.github/renovate.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["config:recommended", "default:automergeAll"], - "gitIgnoredAuthors": ["66853113+pre-commit-ci[bot]@users.noreply.github.com"] -} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 3996638..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,98 +0,0 @@ -name: CI - -on: - push: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - -jobs: - build-pkg: - name: Build Package - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install Poetry - run: pipx install poetry - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: poetry - - name: Install Dependencies - run: poetry install - - name: Build Package - run: poetry build - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: package-py${{ matrix.python-version }} - path: dist/* - strategy: - matrix: - python-version: - - "3.11" - - build-exe: - name: Build Executable - runs-on: ${{ matrix.os }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install Task - uses: arduino/setup-task@v2 - with: - repo-token: ${{ github.token }} - - name: Install Poetry - run: pipx install poetry - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: poetry - - name: Install Dependencies - run: poetry install - - name: Install GNU Softwares - uses: liblaf/template/.github/actions/install@main - with: - brew: coreutils - choco: gnuwin32-coreutils.install - - name: Build Executable - run: poetry run task dist - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }} - path: dist/* - strategy: - matrix: - os: - - ubuntu-latest - - macos-latest - - windows-latest - python-version: - - "3.10" - - "3.11" - - "3.12" - - release: - name: Release - permissions: - contents: write - needs: - - build-pkg - - build-exe - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - steps: - - name: Download Artifacts - uses: actions/download-artifact@v4 - with: - merge-multiple: true - - name: Create GitHub Release - uses: liblaf/template/.github/actions/release@main - with: - tag: dev - files: "*" - prerelease: true diff --git a/.github/workflows/megalinter.yaml b/.github/workflows/megalinter.yaml deleted file mode 100644 index 42e6af5..0000000 --- a/.github/workflows/megalinter.yaml +++ /dev/null @@ -1,156 +0,0 @@ -# ref: -# ref: - -name: MegaLinter - -on: - push: - pull_request: - branches: - - main - -env: - APPLY_FIXES: all - APPLY_FIXES_EVENT: pull_request - APPLY_FIXES_MODE: commit - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }} - cancel-in-progress: true - -jobs: - megalinter: - name: MegaLinter - permissions: - contents: write - issues: write - pull-requests: write - security-events: write - statuses: write - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - token: ${{ github.token }} - - id: ml - name: MegaLinter - uses: oxsecurity/megalinter@v8 - # ref: - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Common Variables - MEGALINTER_CONFIG: .github/.mega-linter.yaml - VALIDATE_ALL_CODEBASE: true - # Linters - PYTHON_PYRIGHT_DISABLE_ERRORS: true - # Reporters - TEXT_REPORTER: true - GITHUB_COMMENT_REPORTER: true - GITHUB_STATUS_REPORTER: true - SARIF_REPORTER: true - UPDATED_SOURCES_REPORTER: true - CONFIG_REPORTER: true - CONSOLE_REPORTER: true - JSON_REPORTER: true - MARKDOWN_SUMMARY_REPORTER: true - - if: success() || failure() - name: Archive production artifacts - uses: actions/upload-artifact@v4 - with: - name: MegaLinter reports - path: |- - mega-linter.log - megalinter-reports/ - - if: success() || failure() - name: Upload MegaLinter scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v3 - with: - sarif_file: megalinter-reports/megalinter-report.sarif - - if: success() || failure() - name: Add GitHub summary - run: cat megalinter-reports/megalinter-report.md >> "$GITHUB_STEP_SUMMARY" - - name: Remove MegaLinter reports - run: >- - sudo rm --force --recursive - .checkov.yml - .devskim.json - kics.config - mega-linter.log - megalinter-reports/ - - id: cpr - if: >- - steps.ml.outputs.has_updated_sources == 1 && - ( - env.APPLY_FIXES_EVENT == 'all' || - env.APPLY_FIXES_EVENT == github.event_name - ) && - env.APPLY_FIXES_MODE == 'pull_request' && - ( - github.event_name == 'push' || - github.event.pull_request.head.repo.full_name == github.repository - ) && - !contains(github.event.head_commit.message, 'skip fix') - name: Create Pull Request with applied fixes - uses: peter-evans/create-pull-request@v7 - with: - token: ${{ github.token }} - commit-message: "chore(MegaLinter): apply linters automatic fixes" - title: "chore(MegaLinter): apply linters automatic fixes" - # TODO: add labels - - if: >- - steps.ml.outputs.has_updated_sources == 1 && - ( - env.APPLY_FIXES_EVENT == 'all' || - env.APPLY_FIXES_EVENT == github.event_name - ) && - env.APPLY_FIXES_MODE == 'pull_request' && - ( - github.event_name == 'push' || - github.event.pull_request.head.repo.full_name == github.repository - ) && - !contains(github.event.head_commit.message, 'skip fix') - name: Create PR output - run: | - echo "PR Number - ${{ steps.cpr.outputs.pull-request-number }}" - echo "PR URL - ${{ steps.cpr.outputs.pull-request-url }}" - - if: >- - steps.ml.outputs.has_updated_sources == 1 && - ( - env.APPLY_FIXES_EVENT == 'all' || - env.APPLY_FIXES_EVENT == github.event_name - ) && - env.APPLY_FIXES_MODE == 'commit' && - github.ref != 'refs/heads/main' && - ( - github.event_name == 'push' || - github.event.pull_request.head.repo.full_name == github.repository - ) && - !contains(github.event.head_commit.message, 'skip fix') - name: Prepare commit - run: sudo chown -Rc $UID .git/ - - if: >- - steps.ml.outputs.has_updated_sources == 1 && - ( - env.APPLY_FIXES_EVENT == 'all' || - env.APPLY_FIXES_EVENT == github.event_name - ) && - env.APPLY_FIXES_MODE == 'commit' && - github.ref != 'refs/heads/main' && - ( - github.event_name == 'push' || - github.event.pull_request.head.repo.full_name == github.repository - ) && - !contains(github.event.head_commit.message, 'skip fix') - name: Commit and push applied linter fixes - uses: stefanzweifel/git-auto-commit-action@v5 - with: - branch: >- - ${{ - github.event.pull_request.head.ref || - github.head_ref || - github.ref - }} - commit_message: "chore(MegaLinter): apply linters fixes" - commit_user_name: megalinter-bot - commit_user_email: nicolas.vuillamy@ox.security diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 657daf6..0000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,148 +0,0 @@ -name: Release - -on: - push: - branches: - - main - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - -jobs: - release: - name: Create GitHub Release - permissions: - contents: write - pull-requests: write - runs-on: ubuntu-latest - outputs: - created: ${{ steps.release.outputs.releases_created }} - tag: ${{ steps.release.outputs.tag_name }} - steps: - - id: release - name: Create GitHub Release - uses: google-github-actions/release-please-action@v4 - with: - release-type: python - - build-pkg: - name: Build Package - needs: - - release - if: needs.release.outputs.created == 'true' - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install Poetry - run: pipx install poetry - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: poetry - - name: Install Dependencies - run: poetry install - - name: Build Package - run: poetry build - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: package - path: dist/* - strategy: - matrix: - python-version: - - "3.11" - - build-exe: - name: Build Executable - needs: - - release - if: needs.release.outputs.created == 'true' - runs-on: ${{ matrix.os }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install Task - uses: arduino/setup-task@v2 - with: - repo-token: ${{ github.token }} - - name: Install Poetry - run: pipx install poetry - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: poetry - - name: Install Dependencies - run: poetry install - - name: Install GNU Softwares - uses: liblaf/template/.github/actions/install@main - with: - brew: coreutils - choco: gnuwin32-coreutils.install - - name: Build Executable - run: poetry run task dist - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }} - path: dist/* - strategy: - matrix: - os: - - ubuntu-latest - - macos-latest - - windows-latest - python-version: - - "3.10" - - "3.11" - - "3.12" - - publish: - name: Publish to PyPI - needs: - - release - if: needs.release.outputs.created == 'true' - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install Poetry - run: pipx install poetry - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: poetry - - name: Install Dependencies - run: poetry install - - name: Publish to PyPI - run: poetry publish --build - env: - POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} - strategy: - matrix: - python-version: - - "3.11" - - upload: - name: Upload Release Assets - permissions: - contents: write - needs: - - release - - build-pkg - - build-exe - if: needs.release.outputs.created == 'true' - runs-on: ubuntu-latest - steps: - - name: Download Artifacts - uses: actions/download-artifact@v4 - with: - merge-multiple: true - - name: Upload Release Assets - run: gh release --repo="${{ github.repository }}" upload "${{ needs.release.outputs.tag }}" * --clobber - env: - GH_TOKEN: ${{ github.token }} diff --git a/.gitignore b/.gitignore index 72e418b..db2cd19 100644 --- a/.gitignore +++ b/.gitignore @@ -185,3 +185,4 @@ *.png assets frames +.github/