Skip to content

Commit

Permalink
Update pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Mar 2, 2025
1 parent e13bc65 commit c63d740
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 58 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
name: Build and Deploy 🚀
name: Build and deploy

on: [push, pull_request]

concurrency:
group: ${{ github.ref }}

jobs:
build_and_deploy:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🚚
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- name: Install dependencies 🌐
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint
run: pnpm run pretty:check

- name: Build 🛠
- name: Build
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
run: pnpm run build

- name: Run tests 🩺
- name: Run tests
run: pnpm run test

- name: Add build.txt 🗓
- name: Add build.txt
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
run: |
git log --pretty=format:'%h' -n 1 > dist/build.txt
Expand All @@ -47,7 +47,7 @@ jobs:
run: |
touch dist/.nojekyll
- name: Deploy 🚀
- name: Deploy
if: github.ref == 'refs/heads/master'
uses: JamesIves/[email protected]
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- master

jobs:
merge_master_to_dev:
merge-master-to-dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Close stale issues/pull requests'
name: Stale
on:
schedule:
- cron: '0 0 * * *'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-algolia-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Update Algolia-Search index
# Only trigger, when the build workflow succeeded on branch master
on:
workflow_run:
workflows: ['Build and Deploy 🚀']
workflows: ['Build and Deploy']
branches: [master]
types: [completed]

Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Update dependencies

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

permissions:
contents: write
pull-requests: write

jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- run: pnpm up --latest --exclude zigbee-herdsman-converters

- uses: peter-evans/create-pull-request@v7
id: cpr
with:
commit-message: 'fix(ignore): update dependencies'
branch: 'deps/all'
title: 'fix(ignore): update dependencies'
token: ${{ secrets.GH_TOKEN }}

- uses: peter-evans/create-or-update-comment@v4
if: ${{ steps.cpr.outputs.pull-request-number }}
with:
issue-number: ${{ steps.cpr.outputs.pull-request-number }}
body: |
CC: @Koenkk
45 changes: 0 additions & 45 deletions .github/workflows/update_deps.yml

This file was deleted.

0 comments on commit c63d740

Please sign in to comment.