Streamline actions, format and switch to Node.js 22

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
XhmikosR
2025-03-30 11:13:02 +03:00
parent 8049d5fdd8
commit d28a5e7019
7 changed files with 57 additions and 48 deletions

View File

@@ -1,23 +1,23 @@
version: 2 version: 2
updates: updates:
- package-ecosystem: npm - package-ecosystem: npm
directory: "/" directory: "/"
schedule: schedule:
interval: weekly interval: weekly
day: saturday day: saturday
time: "10:00" time: "10:00"
open-pull-requests-limit: 10 open-pull-requests-limit: 10
target-branch: development target-branch: development
versioning-strategy: increase versioning-strategy: increase
reviewers: reviewers:
- "pi-hole/web-maintainers" - "pi-hole/web-maintainers"
- package-ecosystem: github-actions - package-ecosystem: github-actions
directory: "/" directory: "/"
schedule: schedule:
interval: weekly interval: weekly
day: saturday day: saturday
time: "10:00" time: "10:00"
open-pull-requests-limit: 10 open-pull-requests-limit: 10
target-branch: development target-branch: development
reviewers: reviewers:
- "pi-hole/web-maintainers" - "pi-hole/web-maintainers"

View File

@@ -3,7 +3,7 @@ name: Codespell
on: on:
push: push:
branches: branches:
- '**' - "**"
pull_request: pull_request:
types: [opened, synchronize, reopened, ready_for_review] types: [opened, synchronize, reopened, ready_for_review]
@@ -12,11 +12,12 @@ jobs:
if: github.event.pull_request.draft == false if: github.event.pull_request.draft == false
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- - name: Clone repository
name: Checkout repository
uses: actions/checkout@v4.2.2 uses: actions/checkout@v4.2.2
- with:
name: Spell-Checking persist-credentials: false
- name: Spell-Checking
uses: codespell-project/actions-codespell@master uses: codespell-project/actions-codespell@master
with: with:
ignore_words_file: .codespellignore ignore_words_file: .codespellignore

View File

@@ -9,6 +9,9 @@ jobs:
name: editorconfig-checker name: editorconfig-checker
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4.2.2 - name: Clone repository
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- uses: editorconfig-checker/action-editorconfig-checker@main - uses: editorconfig-checker/action-editorconfig-checker@main
- run: editorconfig-checker - run: editorconfig-checker

View File

@@ -2,7 +2,7 @@ name: Mark stale issues
on: on:
schedule: schedule:
- cron: '0 8 * * *' - cron: "0 8 * * *"
workflow_dispatch: workflow_dispatch:
issue_comment: issue_comment:
@@ -17,17 +17,17 @@ jobs:
issues: write issues: write
steps: steps:
- uses: actions/stale@v9.1.0 - uses: actions/stale@v9.1.0
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30 days-before-stale: 30
days-before-close: 5 days-before-close: 5
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.' stale-issue-message: "This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days."
stale-issue-label: '${{ env.stale_label }}' stale-issue-label: "${{ env.stale_label }}"
exempt-issue-labels: 'internal, Fixed In Next Release, Bug, never-stale' exempt-issue-labels: "internal, Fixed In Next Release, Bug, never-stale"
exempt-all-issue-assignees: true exempt-all-issue-assignees: true
operations-per-run: 300 operations-per-run: 300
close-issue-reason: 'not_planned' close-issue-reason: "not_planned"
remove_stale: remove_stale:
# trigger "stale" removal immediately when stale issues are commented on # trigger "stale" removal immediately when stale issues are commented on
@@ -40,8 +40,10 @@ jobs:
issues: write # to edit issues label issues: write # to edit issues label
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Clone repository
uses: actions/checkout@v4.2.2 uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Remove 'stale' label - name: Remove 'stale' label
run: gh issue edit ${{ github.event.issue.number }} --remove-label ${{ env.stale_label }} run: gh issue edit ${{ github.event.issue.number }} --remove-label ${{ env.stale_label }}
env: env:

View File

@@ -5,12 +5,11 @@ name: Close stale PR
on: on:
schedule: schedule:
- cron: '0 10 * * *' - cron: "0 10 * * *"
workflow_dispatch: workflow_dispatch:
jobs: jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
issues: write issues: write
@@ -27,9 +26,9 @@ jobs:
# Close PRs immediately, after marking them 'stale' # Close PRs immediately, after marking them 'stale'
days-before-pr-close: 0 days-before-pr-close: 0
# only run the action on merge conflict PR # only run the action on merge conflict PR
any-of-labels: 'Merge Conflicts' any-of-labels: "Merge Conflicts"
exempt-pr-labels: 'internal, never-stale, ON HOLD, WIP' exempt-pr-labels: "internal, never-stale, ON HOLD, WIP"
exempt-all-pr-assignees: true exempt-all-pr-assignees: true
operations-per-run: 300 operations-per-run: 300
stale-pr-message: '' stale-pr-message: ""
close-pr-message: 'Existing merge conflicts have not been addressed. This PR is considered abandoned.' close-pr-message: "Existing merge conflicts have not been addressed. This PR is considered abandoned."

View File

@@ -10,8 +10,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Syncing branches name: Syncing branches
steps: steps:
- name: Checkout - name: Clone repository
uses: actions/checkout@v4.2.2 uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Opening pull request - name: Opening pull request
run: gh pr create -B development -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal' run: gh pr create -B development -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal'
env: env:

View File

@@ -20,11 +20,13 @@ jobs:
steps: steps:
- name: Clone repository - name: Clone repository
uses: actions/checkout@v4.2.2 uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4.3.0 uses: actions/setup-node@v4.3.0
with: with:
node-version: "20.x" node-version: "22.x"
cache: npm cache: npm
- name: Install npm dependencies - name: Install npm dependencies