Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/__validate-dependabot-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# This workflow is centrally managed in https://github.com/<organization>/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
# the above-mentioned repo.

# Validate Dependabot config files.

name: validate dependabot config
permissions: {}

on:
pull_request:

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
validate-dependabot:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Setup Node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: latest

- name: Install dependencies
run: npm install --ignore-scripts

- name: Validate dependabot config
run: npm run validate-dependabot
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Validate Renovate config files.

name: renovate config validator
name: validate renovate config
permissions: {}

on:
Expand All @@ -16,7 +16,7 @@ concurrency:
cancel-in-progress: true

jobs:
renovate-config-validator:
validate-renovate:
permissions:
contents: read
runs-on: ubuntu-latest
Expand All @@ -34,9 +34,15 @@ jobs:
# shellcheck disable=SC2086 # do not quote to keep this as a single line
echo found=${files} >> "${GITHUB_OUTPUT}"

- name: Setup Node
if: steps.find-files.outputs.found != ''
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: latest

- name: Install npm dependencies
if: steps.find-files.outputs.found != ''
run: npm install --ignore-scripts --global renovate
run: npm install --ignore-scripts

- name: renovate config validator
if: steps.find-files.outputs.found != ''
Expand All @@ -47,7 +53,7 @@ jobs:

for FILE in ${{ steps.find-files.outputs.found }}; do
file_status=0
renovate-config-validator --strict ${FILE} || file_status=$?
npm run validate-renovate -- ${FILE} || file_status=$?

# set github step summary
if [ $file_status -ne 0 ]; then
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,7 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# Node
node_modules/
package-lock.json
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "lizardbyte-github",
"version": "0.0.0",
"description": "LizardByte .github repository",
"scripts": {
"validate-dependabot": "validate-dependabot-yaml",
"validate-renovate": "renovate-config-validator --strict"
},
"devDependencies": {
"@bugron/validate-dependabot-yaml": "0.3.3",
"renovate": "43.96.0"
}
}
Loading