Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ paths:
- '"inputs" section is alias node but mapping node is expected'
- '"paths" section must be sequence node but got alias node with "" tag'
- '"paths-ignore" section must be sequence node but got alias node with "" tag'
.github/workflows/issue.yaml:
ignore:
- 'missing input "app-id" which is required by action "actions/create-github-app-token@v3"'
- 'input "client-id" is not defined in action "actions/create-github-app-token@v3"'
.github/workflows/test.yaml:
ignore:
- 'property ".+" is not defined in object type'
11 changes: 6 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ on:
# types: [published]

env:
dev: ${{ inputs.dev || github.event.release.prerelease }}
dev: ${{ (inputs.dev || github.event.release.prerelease) && 'dev' || '' }}

jobs:
build:
name: "Build"
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 15

permissions:
contents: write
Expand Down Expand Up @@ -61,19 +61,19 @@ jobs:
platforms: linux/amd64,linux/arm64

- name: "Update Version Tags"
if: ${{ !env.dev }}
id: version
uses: cssnr/update-version-tags-action@v2
with:
prefix: ""
dry_run: true
tags: |
${{ inputs.tags }}

- name: "Debug Version Tags"
continue-on-error: true
run: |
echo "github.ref_name: ${{ github.ref_name }}"
echo "tags1: ${{ env.dev && 'dev' || '' }}"
echo "tags1: ${{ env.dev }}"
echo "tags2: ${{ steps.version.outputs.tags }}"
echo "tags3: ${{ inputs.tags }}"

Expand All @@ -83,7 +83,7 @@ jobs:
with:
images: "ghcr.io/${{ github.repository }}"
tags: |
${{ env.dev && 'dev' || '' }}
${{ env.dev }}
${{ steps.version.outputs.tags }}
${{ inputs.tags }}

Expand Down Expand Up @@ -114,3 +114,4 @@ jobs:
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
description: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
61 changes: 33 additions & 28 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ name: "Deploy"

on:
workflow_call:
workflow_dispatch:
inputs:
inputs: &inputs
version:
description: "Version Tag"
required: false
type: string
workflow_dispatch:
inputs: *inputs
#workflow_run:
# workflows: ["Build"]
# types: [completed]
Expand All @@ -29,12 +31,23 @@ jobs:
url: https://badges.cssnr.com/

steps:
- name: "Checkout"
uses: actions/checkout@v6

- name: "Debug event.json"
if: ${{ !github.event.act }}
continue-on-error: true
run: cat "${GITHUB_EVENT_PATH}"
- name: "Debug CTX github"
if: ${{ !github.event.act }}
continue-on-error: true
env:
GITHUB_CTX: ${{ toJSON(github) }}
run: echo "$GITHUB_CTX"
- name: "Debug Environment"
if: ${{ !github.event.act }}
continue-on-error: true
run: env

- name: "Debug 1"
continue-on-error: true
Expand All @@ -45,7 +58,7 @@ jobs:
echo "env.version: ${{ env.version }}"

- name: "Portainer Deploy"
uses: cssnr/portainer-stack-deploy-action@v1
uses: cssnr/portainer-stack-deploy-action@v2
env:
version: ${{ env.version == 'master' && 'latest' || env.version }}
with:
Expand All @@ -55,35 +68,27 @@ jobs:
name: ${{ env.stack-name }}
username: ${{ vars.GHCR_USER }}
password: ${{ secrets.GHCR_PASS }}
env_json: |
{
"VERSION": "${{ env.version }}",
"STACK_NAME": "${{ env.stack-name }}",
"TRAEFIK_HOST": "${{ env.traefik-host }}",
"GITHUB_TOKEN": "${{ secrets.GH_PAT }}",
"VT_API_KEY": "${{ secrets.VT_API_KEY }}",
"SENTRY_URL": "${{ secrets.SENTRY_URL }}",
"SENTRY_ENVIRONMENT": "prod",
"INFLUX_URL": "${{ secrets.INFLUX_URL }}",
"INFLUX_TOKEN": "${{ secrets.INFLUX_TOKEN }}",
"INFLUX_ORG": "${{ vars.INFLUX_ORG }}",
"INFLUX_BUCKET": "${{ vars.INFLUX_BUCKET }}"
}
type: file
env_data: |
VERSION: "${{ env.version }}"
STACK_NAME: "${{ env.stack-name }}"
TRAEFIK_HOST: "${{ env.traefik-host }}"
GITHUB_TOKEN": "${{ secrets.GH_PAT }}"
VT_API_KEY": "${{ secrets.VT_API_KEY }}"
SENTRY_URL": "${{ secrets.SENTRY_URL }}"
SENTRY_ENVIRONMENT": "prod"
INFLUX_URL": "${{ secrets.INFLUX_URL }}"
INFLUX_TOKEN": "${{ secrets.INFLUX_TOKEN }}"
INFLUX_ORG": "${{ vars.INFLUX_ORG }}"
INFLUX_BUCKET": "${{ vars.INFLUX_BUCKET }}

#- name: "Debug 2"
# continue-on-error: true
# env:
# version: ${{ env.version == 'master' && 'latest' || env.version }}
# run: |
# echo "env.version: ${{ env.version }}"
# echo "ghcr.io/${{ github.repository }}:${{ env.version }}"
#
## https://render.com/docs/deploy-hooks#deploying-from-an-image-registry
#- name: "Render Deploy"
#- name: "Deploy Image"
# uses: cssnr/web-request-action@v2
# continue-on-error: true
# uses: cssnr/web-request-action@v1
# env:
# version: ${{ env.version == 'master' && 'latest' || env.version }}
# with:
# url: ${{ secrets.RENDER_HOOK }}
# params: '{"imgURL": "ghcr.io/${{ github.repository }}:${{ env.version }}"}'
# params: |
# imgURL: ghcr.io/${{ github.repository }}:${{ env.version }}
4 changes: 1 addition & 3 deletions .github/workflows/draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ name: "Draft Release"
on:
workflow_dispatch:
push:
branches: ["master"]
release:
types: [published]
branches: [master, main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/issue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Issue"

on:
issues:
types: [opened]

jobs:
issue:
name: "Issue"
if: |
!github.event.issue.labels[0] ||
contains(github.event.issue.labels.*.name, 'bug')
runs-on: ubuntu-latest
timeout-minutes: 15

permissions:
contents: write
issues: write

steps:
- name: "Checkout"
uses: actions/checkout@v6

- name: "AI Issue"
uses: cssnr/ai-issue-action@v1
with:
model: big-pickle
tail: |
_Response generated by the [AI Issue Action](https://github.com/cssnr/ai-issue-action)._
instructions: |
You are a helpful assistant responding to a GitHub Issue created by user @${{ github.actor }}
in the repository ${{ github.server_url }}/${{ github.repository }}
Provide initial triage and troubleshooting steps, then gather any additional information needed to proceed.
Respond using your general knowledge and the following knowledge files:
url: https://smashedr.github.io/node-badges-docs/llms.txt
4 changes: 4 additions & 0 deletions .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: "PR Labeler"
on:
pull_request_target:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
labeler:
name: "Labeler"
Expand Down
78 changes: 25 additions & 53 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "Lint"
on:
workflow_dispatch:
push:
branches: [master]
branches: [master, main]
pull_request:

concurrency:
Expand All @@ -15,15 +15,34 @@ jobs:
name: "Lint"
runs-on: ubuntu-latest
timeout-minutes: 5

permissions:
pull-requests: write
checks: write
if: ${{ !contains(github.event.head_commit.message, '#nolint') }}

steps:
- name: "Checkout"
uses: actions/checkout@v6

- name: "Setup Node"
uses: actions/setup-node@v6
with:
node-version: 24

- name: "install"
id: install
run: npm ci

- name: "Debug"
continue-on-error: true
run: ls -lahR dist

- name: "eslint"
if: ${{ !cancelled() }}
run: |
npm run lint

- name: "prettier"
if: ${{ !cancelled() }}
run: npm run prettier:check

- name: "yamllint"
if: ${{ !cancelled() }}
env:
Expand All @@ -37,57 +56,10 @@ jobs:
- name: "actionlint"
if: ${{ !cancelled() }}
uses: cssnr/actionlint-action@v1
with:
shellcheck_opts: -e SC2129

- name: "hadolint"
if: ${{ !cancelled() }}
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
uses: hadolint/hadolint-action@v3.3.0
with:
dockerfile: Dockerfile
ignore: "DL3018"

- name: "ShellCheck"
if: ${{ !cancelled() }}
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: -x

#- name: "ESLint Annotate"
# if: ${{ !cancelled() && steps.eslint.outcome != 'success' }}
# continue-on-error: true
# uses: ataylorme/eslint-annotate-action@v3

npm-lint:
name: "NPM Lint"
runs-on: ubuntu-latest
timeout-minutes: 5

permissions:
pull-requests: write
checks: write

steps:
- name: "Checkout"
uses: actions/checkout@v6

- name: "Setup Node"
uses: actions/setup-node@v6
with:
node-version: 24

- name: "Install"
id: install
run: |
npm ci

- name: "eslint"
id: eslint
if: ${{ !cancelled() }}
run: |
npm run lint

- name: "prettier"
if: ${{ !cancelled() }}
run: |
npm run prettier:check
19 changes: 12 additions & 7 deletions .github/workflows/render.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Render"

on:
push:
branches-ignore: [master]
branches-ignore: [master, main]
paths:
- ".github/workflows/render.yaml"
- "src/**"
Expand All @@ -16,9 +16,6 @@ on:
inputs:
version:
description: "Version Tag"
#workflow_run:
# workflows: ["Build"]
# types: [completed]

env:
version: ${{ inputs.version || github.ref_name }}
Expand All @@ -37,14 +34,22 @@ jobs:
url: https://node-badges.onrender.com/

steps:
- name: "Debug event.json"
if: ${{ !github.event.act }}
continue-on-error: true
run: cat "${GITHUB_EVENT_PATH}"
- name: "Debug CTX github"
if: ${{ !github.event.act }}
continue-on-error: true
env:
GITHUB_CTX: ${{ toJSON(github) }}
run: echo "$GITHUB_CTX"
- name: "Debug Environment"
if: ${{ !github.event.act }}
continue-on-error: true
run: env

- name: "Debug Branch ref"
- name: "Debug ref"
continue-on-error: true
run: |
echo "github.ref_name: ${{ github.ref_name }}"
Expand All @@ -53,7 +58,7 @@ jobs:
echo "--------------------"
echo "ref: ${{ github.ref_name }}"

- name: "Debug Image version"
- name: "Debug imgURL"
continue-on-error: true
env:
version: ${{ env.version == 'master' && 'latest' || env.version }}
Expand Down Expand Up @@ -82,4 +87,4 @@ jobs:
with:
url: ${{ secrets.RENDER_HOOK }}
params: |
ref: ${{ github.ref_name }}
ref: ${{ github.sha }}
2 changes: 1 addition & 1 deletion .github/yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ ignore-from-file: .gitignore

rules:
line-length:
max: 119
max: 120
Loading
Loading