From ec8b32c1cb082a5ffc1326d3423664c13fba3ef5 Mon Sep 17 00:00:00 2001 From: lmdanavanem <287339505+lmdanavanem@users.noreply.github.com> Date: Sun, 6 Sep 2026 04:03:31 +0200 Subject: [PATCH] chore: harden repository collaboration --- .github/dependabot.yml | 14 +++++++++++++ .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..9f6c109 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: monday + time: "06:00" + timezone: Europe/Zurich + open-pull-requests-limit: 3 + groups: + github-actions: + patterns: ["*"] + update-types: [minor, patch] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d234252 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + quality: + name: Quality + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Check out repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Parse PowerShell scripts + shell: pwsh + run: | + $parseErrors = @() + Get-ChildItem -Path . -Recurse -Filter '*.ps1' -File | ForEach-Object { + $tokens = $null + $errors = $null + [void][System.Management.Automation.Language.Parser]::ParseFile( + $_.FullName, + [ref]$tokens, + [ref]$errors + ) + $parseErrors += $errors + } + if ($parseErrors.Count -gt 0) { + $parseErrors | ForEach-Object { Write-Error $_ } + exit 1 + }