Skip to content

Commit

Permalink
chore: add workflow updates (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
palashmon committed Apr 25, 2024
1 parent e0eac13 commit 629bf8b
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 59 deletions.
10 changes: 5 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# editorconfig.org
root = true

[*]
indent_style = tab
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100

[*.yml]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
42 changes: 42 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# .github/release.yml

changelog:
exclude:
labels:
- documentation
- ignore-for-release
categories:
- title: Breaking Changes
labels:
- breaking
exclude:
labels:
- dependencies
- title: New Features
labels:
- enhancement
exclude:
labels:
- dependencies
- title: Bug Fixes
labels:
- bug
exclude:
labels:
- dependencies
- title: Security Patches
labels:
- security
- "security"
exclude:
labels:
- dependencies
- title: Dependencies
labels:
- dependencies
- title: Maintenance
labels:
- "*"
exclude:
labels:
- dependencies
19 changes: 4 additions & 15 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
name: Auto-approve PR
on: pull_request_target
permissions:
contents: write
pull-requests: write
jobs:
auto-approve-renovate-prs:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
fetch-depth: '0'
- name: Approve PR
if: github.actor == 'renovate[bot]'
run: |
gh pr review --approve ${{ github.event.number }} -b "I'm **approving** \
this pull request because it includes a patch or minor update."
env:
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
apply:
if: github.actor == 'renovate[bot]'
uses: palashmon/reusable-workflows/.github/workflows/auto-approve.yml@main
secrets: inherit
30 changes: 14 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
name: CI
on: [push, pull_request]

on:
push:
branches:
- main
- master
pull_request: # PRs to main branches
workflow_dispatch: # manual trigger

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

jobs:
test:
name: Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ['lts/*', 'current']
steps:
- name: Checkout Repo
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- name: Setup Node.js (${{ matrix.node-version }})
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
uses: palashmon/reusable-workflows/.github/workflows/main-build.yml@main
8 changes: 8 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: PR labeler
on:
- pull_request_target
jobs:
apply:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} # only PRs from this repo
uses: palashmon/reusable-workflows/.github/workflows/labeler-reusable.yml@main
secrets: inherit
31 changes: 8 additions & 23 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests
name: 'Close stale issues and PRs'
on:
schedule:
- cron: "*/10 5 * * *"
- cron: '30 1 * * *'
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 365
stale-issue-message: "This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days."
stale-pr-message: "This PR is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days."
close-issue-message: "This issue was closed because it has been stalled for 7 days with no activity."
close-pr-message: "This PR was closed because it has been stalled for 7 days with no activity."
exempt-issue-labels: "Help Wanted, Good first issue, Never gets stale"
exempt-pr-labels: "Help Wanted, Never gets stale"
apply:
uses: palashmon/reusable-workflows/.github/workflows/stale.yml@main
secrets: inherit

0 comments on commit 629bf8b

Please sign in to comment.