2 Commits

Author SHA1 Message Date
166fa43a55 refactor: enhancement and documenting 2025-01-04 08:48:18 +03:30
c032870efb feat: add sync label 2025-01-04 08:30:20 +03:30
6 changed files with 50 additions and 24 deletions

View File

@@ -2,6 +2,10 @@
name: Build, Lint, and Test Project name: Build, Lint, and Test Project
# Required permission on the caller workflow
# permissions:
# contents: read
on: on:
workflow_call: workflow_call:
inputs: inputs:
@@ -11,9 +15,6 @@ on:
default: 'lts/*' default: 'lts/*'
type: string type: string
permissions:
contents: read
jobs: jobs:
main: main:
name: Build, Lint, and Test Project name: Build, Lint, and Test Project
@@ -26,7 +27,7 @@ jobs:
- name: 🔧 Setup Node.js - name: 🔧 Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: ${{ inputs.NODE_VERSION }} node-version: ${{ inputs.node-version }}
- name: 🛠️ Setup Node.js Corepack - name: 🛠️ Setup Node.js Corepack
run: corepack enable run: corepack enable

View File

@@ -2,14 +2,15 @@
name: CodeQL name: CodeQL
# Required permission on the caller workflow
# permissions:
# actions: read
# contents: read
# security-events: write
on: on:
workflow_call: workflow_call:
permissions:
actions: read
contents: read
security-events: write
jobs: jobs:
main: main:
name: CodeQL Analyze name: CodeQL Analyze

View File

@@ -2,6 +2,10 @@
name: Dependency Review name: Dependency Review
# Required permission on the caller workflow
# permissions:
# contents: read
on: on:
workflow_call: workflow_call:
inputs: inputs:
@@ -16,9 +20,6 @@ on:
type: string type: string
default: 'next' default: 'next'
permissions:
contents: read
jobs: jobs:
main: main:
name: Dependency Review name: Dependency Review

View File

@@ -2,6 +2,11 @@
name: Publish NPM name: Publish NPM
# Required permission on the caller workflow
# permissions:
# contents: read
# id-token: write
on: on:
workflow_call: workflow_call:
inputs: inputs:
@@ -20,10 +25,6 @@ on:
required: true required: true
description: 'NPM token' description: 'NPM token'
permissions:
contents: read
id-token: write
jobs: jobs:
main: main:
if: github.repository_owner == 'the-nexim' if: github.repository_owner == 'the-nexim'

View File

@@ -2,6 +2,10 @@
name: Build & Lint & Test & Release name: Build & Lint & Test & Release
# Required permission on the caller workflow
# permissions:
# contents: write
on: on:
workflow_call: workflow_call:
inputs: inputs:
@@ -14,16 +18,10 @@ on:
GPG_KEY_ID: GPG_KEY_ID:
required: true required: true
description: 'GPG key ID' description: 'GPG key ID'
BOT_TOKEN:
required: true
description: 'Nexim Bot token'
GPG_PRIVATE_KEY: GPG_PRIVATE_KEY:
required: true required: true
description: 'GPG private key' description: 'GPG private key'
permissions:
contents: write
jobs: jobs:
main: main:
name: Build & Lint & Test & Release name: Build & Lint & Test & Release
@@ -34,7 +32,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.BOT_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: 🙂‍↔️ Import GPG key - name: 🙂‍↔️ Import GPG key
run: | run: |
@@ -94,5 +92,5 @@ jobs:
- name: 🤖 Get Release - name: 🤖 Get Release
run: yarn lerna version --yes run: yarn lerna version --yes
env: env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WIREIT_LOGGER: metrics WIREIT_LOGGER: metrics

24
.github/workflows/sync-label.yaml vendored Normal file
View File

@@ -0,0 +1,24 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Sync labels
# Required permission on the caller workflow
# permissions:
# contents: read
# issues: write
on:
workflow_call:
jobs:
main:
name: Sync labels
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4
- name: 🚀 Run Label Syncer
uses: micnncim/action-label-syncer@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}