Skip to content

Commit

Permalink
Add multiple GitHub CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rainx committed Oct 19, 2023
1 parent ff0f1b0 commit f59baa9
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint
on:
push:
branches: [main, feature/**]
pull_request:
branches: [main]

jobs:
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Prepare Node.js
uses: actions/setup-node@v3.8.1
with:
node-version-file: .node-version

- name: Install deps
run: npm install -g markdownlint-cli

- name: Lint the markdown file
run: markdownlint 'README.md'
32 changes: 32 additions & 0 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Lock

on:
schedule:
- cron: '0 9 * * *'
workflow_dispatch:

jobs:
lock:
name: 🔒 Lock closed issues and PRs
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2.0.3
with:
github-token: ${{ github.token }}
issue-lock-inactive-days: '30'
issue-lock-reason: ''
issue-comment: >
Issue closed and locked due to lack of activity.
If you encounter this same issue, please open a new issue and refer
to this closed one.
pr-lock-inactive-days: '1'
pr-lock-reason: ''
pr-comment: >
Pull Request closed and locked due to lack of activity.
If you'd like to build on this closed PR, you can clone it using
this method: https://stackoverflow.com/a/14969986
Then open a new PR, referencing this closed PR in your message.
44 changes: 44 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Stale

on:
schedule:
- cron: '0 8 * * *'
workflow_dispatch:

jobs:
stale:
name: 🧹 Clean up stale issues and PRs
runs-on: ubuntu-latest
steps:
- name: 🚀 Run stale
uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
days-before-close: 7
remove-stale-when-updated: true
stale-issue-label: 'stale'
exempt-issue-labels: 'no-stale,help-wanted'
stale-issue-message: >
There hasn't been any activity on this issue recently, and in order
to prioritize active issues, it will be marked as stale.
Please make sure to update to the latest version and
check if that solves the issue. Let us know if that works for you
by leaving a 👍
Because this issue is marked as stale, it will be closed and locked
in 7 days if no further activity occurs.
Thank you for your contributions!
stale-pr-label: 'stale'
exempt-pr-labels: 'no-stale'
stale-pr-message: >
There hasn't been any activity on this pull request recently, and in
order to prioritize active work, it has been marked as stale.
This PR will be closed and locked in 7 days if no further activity
occurs.
Thank you for your contributions!
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.17.1

0 comments on commit f59baa9

Please sign in to comment.