Merge branch 'master' into dev

This commit is contained in:
koenkk
2023-05-24 13:11:44 +02:00
12 changed files with 73 additions and 145 deletions
+3
View File
@@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: "IMPORTANT: Check development branch changelog first!!"
url: https://github.com/Koenkk/zigbee2mqtt/releases/tag/latest-dev
about: "Before submitting an issue, check if the issue hasn't already been solved in the development branch. Click 'Open' to see the release notes of the development branch. In case it is, you can read here how to switch to the development branch: https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html"
- name: Questions/discussion
url: https://github.com/Koenkk/zigbee2mqtt/discussions/new
about: Ask questions, discuss about devices or show things you made
+12 -9
View File
@@ -1,9 +1,14 @@
name: CI
name: ci
on: [push, pull_request]
on:
pull_request:
push:
branches-ignore:
- deps/*
permissions:
contents: read
contents: write
pull-requests: write
jobs:
ci:
@@ -12,9 +17,9 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
registry-url: https://registry.npmjs.org/
cache: 'npm'
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
@@ -28,7 +33,7 @@ jobs:
run: echo ${{ secrets.DOCKER_KEY }} | docker login -u koenkk --password-stdin
- name: Docker login ghcr.io
if: (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push'
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u koenkk --password-stdin
run: echo ${{ secrets.GH_TOKEN }} | docker login ghcr.io -u koenkk --password-stdin
- name: Docker setup - QEMU
if: (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push'
uses: docker/setup-qemu-action@v2
@@ -73,7 +78,7 @@ jobs:
run: |
curl \
-X POST \
-H "Authorization: token ${{ secrets.CR_PAT }}" \
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/zigbee2mqtt/hassio-zigbee2mqtt/actions/workflows/ci.yml/dispatches \
-d '{"ref":"master","inputs":{}}'
@@ -95,8 +100,6 @@ jobs:
- name: Install dependencies
# --ignore-scripts prevents the serialport build which often fails on Windows
run: npm ci --ignore-scripts
- name: Lint
run: npm run eslint
- name: Build
run: npm run build
- name: Test
+3 -14
View File
@@ -1,34 +1,23 @@
name: "Code Scanning - Action"
name: codeql
on:
pull_request:
push:
branches:
- dev
jobs:
CodeQL-Build:
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
uses: github/codeql-action/autobuild@v2
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
@@ -1,4 +1,4 @@
name: 'Dependency review'
name: deps-review
on: [pull_request]
permissions:
+2 -2
View File
@@ -1,7 +1,7 @@
on:
workflow_dispatch:
name: GHCR cleanup
name: ghcr-cleanup
permissions: {}
jobs:
@@ -12,7 +12,7 @@ jobs:
- name: Delete untagged images
uses: actions/github-script@v6
with:
github-token: ${{ secrets.CR_PAT }}
github-token: ${{ secrets.GH_TOKEN }}
script: |
const response = await github.request("GET /${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions",
{ per_page: ${{ env.PER_PAGE }}
+7 -2
View File
@@ -13,13 +13,18 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
package-name: release-please-action
default-branch: dev
token: ${{secrets.CR_PAT}}
token: ${{secrets.GH_TOKEN}}
# Checkout repos
- uses: actions/checkout@v3
@@ -54,7 +59,7 @@ jobs:
npm ci
node scripts/generateChangelog.js $MASTER_Z2M_VERSION $MASTER_ZHC_VERSION $MASTER_ZH_VERSION >> ../changelog
env:
GH_TOKEN: ${{secrets.CR_PAT}}
GH_TOKEN: ${{secrets.GH_TOKEN}}
- uses: ncipollo/release-action@v1
with:
bodyFile: changelog
+3 -8
View File
@@ -1,17 +1,12 @@
name: "Close stale issues/pull requests"
name: stale
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
@@ -21,5 +16,5 @@ jobs:
stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days'
days-before-stale: 30
days-before-close: 7
operations-per-run: 500
exempt-issue-labels: dont-stale
operations-per-run: 500
+37
View File
@@ -0,0 +1,37 @@
on:
repository_dispatch:
types: update_dep
name: update-dep
permissions: {}
jobs:
update_dep:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: dev
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- run: npm install ${{ github.event.client_payload.package }}@${{ github.event.client_payload.version }} --save-exact
- uses: peter-evans/create-pull-request@v5
id: cpr
with:
commit-message: "fix(ignore): update ${{ github.event.client_payload.package }} to ${{ github.event.client_payload.version }}"
branch: "deps/${{ github.event.client_payload.package }}"
title: Update ${{ github.event.client_payload.package }} to ${{ github.event.client_payload.version }}
- run: sleep 5 # Otherwise pull request may not exist yet causing automerge to fail
- uses: peter-evans/enable-pull-request-automerge@v3
if: steps.cpr.outputs.pull-request-operation == 'created'
with:
token: ${{ secrets.GH_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash
+5 -4
View File
@@ -17,14 +17,15 @@ jobs:
- uses: actions/checkout@v3
with:
ref: dev
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: npm
- run: npx npm-check-updates -u -x connect-gzip-static # connect-gzip-static only supports node 16
- run: npm install
- uses: peter-evans/create-pull-request@v5
with:
commit-message: "feat(ignore): update dependencies"
branch: "update_deps"
commit-message: "fix(ignore): update dependencies"
branch: "deps/all"
title: Update dependencies
-35
View File
@@ -1,35 +0,0 @@
name: Update zigbee-frontend
on:
repository_dispatch:
types: update_frontend
permissions: {}
jobs:
update_frontend:
permissions:
contents: write # to create branch (peter-evans/create-pull-request)
pull-requests: write # to create a PR (peter-evans/create-pull-request)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: dev
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install zigbee2mqtt-frontend@${{ github.event.client_payload.version }} --save-exact
- uses: peter-evans/create-pull-request@v5
id: cpr
with:
commit-message: "feat(ignore): update zigbee2mqtt-frontend to ${{ github.event.client_payload.version }}"
branch: "update_frontend"
title: Update zigbee-frontend to ${{ github.event.client_payload.version }}
- run: sleep 5 # Otherwise pull request may not exist yet causing automerge to fail
- uses: peter-evans/enable-pull-request-automerge@v3
if: steps.cpr.outputs.pull-request-operation == 'created'
with:
token: ${{ secrets.CR_PAT }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash
-35
View File
@@ -1,35 +0,0 @@
name: Update zigbee-herdsman
on:
repository_dispatch:
types: update_zh
permissions: {}
jobs:
update_zh:
permissions:
contents: write # to create branch (peter-evans/create-pull-request)
pull-requests: write # to create a PR (peter-evans/create-pull-request)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: dev
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install zigbee-herdsman@${{ github.event.client_payload.version }} --save-exact
- uses: peter-evans/create-pull-request@v5
id: cpr
with:
commit-message: "feat(ignore): update zigbee-herdsman to ${{ github.event.client_payload.version }}"
branch: "update_zh"
title: Update zigbee-herdsman to ${{ github.event.client_payload.version }}
- run: sleep 5 # Otherwise pull request may not exist yet causing automerge to fail
- uses: peter-evans/enable-pull-request-automerge@v3
if: steps.cpr.outputs.pull-request-operation == 'created'
with:
token: ${{ secrets.CR_PAT }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash
-35
View File
@@ -1,35 +0,0 @@
name: Update zigbee-herdsman-converters
on:
repository_dispatch:
types: update_zhc
permissions: {}
jobs:
update_zhc:
permissions:
contents: write # to create branch (peter-evans/create-pull-request)
pull-requests: write # to create a PR (peter-evans/create-pull-request)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: dev
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install zigbee-herdsman-converters@${{ github.event.client_payload.version }} --save-exact
- uses: peter-evans/create-pull-request@v5
id: cpr
with:
commit-message: "feat(ignore): update zigbee-herdsman-converters to ${{ github.event.client_payload.version }}"
branch: "update_zhc"
title: Update zigbee-herdsman-converters to ${{ github.event.client_payload.version }}
- run: sleep 5 # Otherwise pull request may not exist yet causing automerge to fail
- uses: peter-evans/enable-pull-request-automerge@v3
if: steps.cpr.outputs.pull-request-operation == 'created'
with:
token: ${{ secrets.CR_PAT }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash