diff --git a/.github/workflows/check-metadata.yml b/.github/workflows/check-metadata.yml new file mode 100644 index 0000000..084a11f --- /dev/null +++ b/.github/workflows/check-metadata.yml @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: MIT + +name: Metadata checker + +on: + push: + branches: + - main + pull_request: + branches: + - main + paths: + - '*.user.js' + - '*.user.css' + - 'maintenance/check-metadata.sh' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +permissions: {} + +jobs: + check: + name: Check metadata + runs-on: ubuntu-latest + steps: + - name: Fetch source code + uses: actions/checkout@v4 + + - name: Do check metadata + run: + ./maintenance/check-metadata.sh diff --git a/maintenance/check-metadata.sh b/maintenance/check-metadata.sh index 48720e9..7396366 100755 --- a/maintenance/check-metadata.sh +++ b/maintenance/check-metadata.sh @@ -1,5 +1,11 @@ #!/bin/bash +# Check metadata of userscripts and userstyles +# +# Used by GitHub Actions. Can be used locally: +# +# $ ./maintenance/check-metadata.sh + set -e set -u