Skip to content

Commit

Permalink
ci: update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Albert Hernandez Pellicer committed Jan 7, 2024
1 parent f208349 commit 3a2e793
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 49 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/assign-me.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: assign-me

on:
pull_request:

jobs:
set_assignee:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
assignees: [context.actor],
})
21 changes: 0 additions & 21 deletions .github/workflows/check-pr-title.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/compressed-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Compressed Size

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: preactjs/compressed-size-action@v2
14 changes: 14 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
47 changes: 47 additions & 0 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'Lint PR Title'

on:
pull_request:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled

permissions:
pull-requests: write

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
ignoreLabels: |
bot
autorelease: pending
- uses: marocchino/sticky-pull-request-comment@v2
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
message: |
Hey mate 👋. Thank you for opening this Pull Request 🤘. It is really awesome to see this contribution 🚀
🔎 When working with this project we are requesting to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted 🥶.
👇 Bellow you can find details about what failed:
```
${{ steps.lint_pr_title.outputs.error_message }}
```
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
delete: true
22 changes: 22 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Node

on: [push]

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛬
uses: actions/checkout@v4
- name: Setup Node ⚙️
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies 📥
uses: bahmutov/npm-install@v1
- name: Build typescript 📦
run: npm run build
- name: Lint code 💅
run: npm run lint
- name: Run tests ✅
run: npm run test
27 changes: 0 additions & 27 deletions .github/workflows/nodejs.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</p>

<p align="center">
<a href="https://github.com/AlbertHernandez/express-typescript-service-template/actions/workflows/nodejs.yml?branch=main"><img src="https://github.com/AlbertHernandez/express-typescript-service-template/actions/workflows/nodejs.yml/badge.svg?branch=main" alt="nodejs"/></a>
<a href="https://github.com/AlbertHernandez/express-typescript-service-template/actions/workflows/node.yml?branch=main"><img src="https://github.com/AlbertHernandez/express-typescript-service-template/actions/workflows/node.yml/badge.svg?branch=main" alt="nodejs"/></a>
<a href="https://nodejs.org/docs/latest-v20.x/api/index.html"><img src="https://img.shields.io/badge/node-20.x-green.svg" alt="node"/></a>
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/typescript-5.x-blue.svg" alt="typescript"/></a>
<a href="https://www.npmjs.com/"><img src="https://img.shields.io/badge/npm-10.x-red.svg" alt="npm"/></a>
Expand Down

0 comments on commit 3a2e793

Please sign in to comment.