Compare commits

..

4 Commits

Author SHA1 Message Date
renovate[bot]
5f14fd7ed3 chore(deps)!: update node (20.19.5 → 22.20.0) (#295) 2025-10-15 23:08:43 +03:00
renovate[bot]
277d5edf5c chore(deps)!: update image ubuntu to v24 (#294) 2025-10-15 22:07:11 +03:00
57cbd83dc6 chore: update docs, vscode settings (#296) 2025-10-15 14:49:18 +03:00
33631ad911 chore: setup-node v6; add monthly metrics; extend validator inputs title (#293)
* feat: add montly issue stats

* chore: update actions

* fix(stale): use validate-inputs
2025-10-15 14:38:07 +03:00
8 changed files with 77 additions and 18 deletions

View File

@@ -31,9 +31,9 @@ runs:
run: uv sync --frozen
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: '20'
node-version: '22'
cache: npm
- name: Install Node dependencies

42
.github/workflows/issue-stats.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Monthly issue metrics
on:
workflow_dispatch:
schedule:
- cron: '3 2 1 * *'
permissions:
contents: read
jobs:
build:
name: issue metrics
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: read
steps:
- name: Get dates for last month
shell: bash
run: |
# Calculate the first day of the previous month
first_day=$(date -d "last month" +%Y-%m-01)
# Calculate the last day of the previous month
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)
#Set an environment variable with the date range
echo "$first_day..$last_day"
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
- name: Run issue-metrics tool
uses: github/issue-metrics@c640329f02bd24b12b91d51cd385f0b1c25cefb9 # v3.25.1
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEARCH_QUERY: 'repo:ivuorinen/actions is:issue created:${{ env.last_month }} -reason:"not planned"'
- name: Create issue
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0
with:
title: Monthly issue metrics report
token: ${{ secrets.GITHUB_TOKEN }}
content-filepath: ./issue_metrics.md

View File

@@ -3,5 +3,6 @@
"connectionId": "ivuorinen",
"projectKey": "ivuorinen_actions"
},
"sarif-viewer.connectToGithubCodeScanning": "on"
"sarif-viewer.connectToGithubCodeScanning": "on",
"makefile.configureOnOpen": false
}

View File

@@ -10,7 +10,7 @@ ARG ACT_VERSION=0.2.71
ARG SHELLSPEC_VERSION=0.28.1
# Stage 1: Build kcov separately to keep final image slim
FROM ubuntu:22.04 AS kcov-builder
FROM ubuntu:24.04 AS kcov-builder
ARG KCOV_VERSION
@@ -43,7 +43,7 @@ RUN cmake .. \
&& make install DESTDIR=/kcov-install
# Stage 2: Base system setup
FROM ubuntu:22.04 AS base
FROM ubuntu:24.04 AS base
LABEL maintainer="ivuorinen"
LABEL description="GitHub Actions testing framework with pre-installed tools"

View File

@@ -266,7 +266,7 @@ runs:
- name: Setup Node.js
id: setup
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.version.outputs.detected-version }}
registry-url: ${{ inputs.registry-url }}

View File

@@ -38,18 +38,12 @@ runs:
steps:
- name: Validate Inputs
id: validate
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.token }}
run: |
set -euo pipefail
# Check for obvious token misconfigurations
if [[ -z "$GITHUB_TOKEN" ]] || [[ "$GITHUB_TOKEN" == *'${{'* ]] || [[ "$GITHUB_TOKEN" == 'secrets.'* ]]; then
echo "::warning::GitHub token appears to be unevaluated or misconfigured. Please provide a valid token."
fi
echo "Input validation completed successfully"
uses: ./validate-inputs
with:
action: 'stale'
token: ${{ inputs.token }}
days-before-stale: ${{ inputs.days-before-stale }}
days-before-close: ${{ inputs.days-before-close }}
- name: 🚀 Run stale
id: stale

View File

@@ -35,6 +35,8 @@ Centralized Python-based input validation for GitHub Actions with PCRE regex sup
| `image-quality` | <p>Image quality percentage</p> | `false` | `""` |
| `png-quality` | <p>PNG quality percentage</p> | `false` | `""` |
| `parallel-builds` | <p>Number of parallel builds</p> | `false` | `""` |
| `days-before-stale` | <p>Number of days before marking as stale</p> | `false` | `""` |
| `days-before-close` | <p>Number of days before closing stale items</p> | `false` | `""` |
| `pre-commit-config` | <p>Pre-commit configuration file path</p> | `false` | `""` |
| `base-branch` | <p>Base branch name</p> | `false` | `""` |
| `dry-run` | <p>Dry run mode</p> | `false` | `""` |
@@ -226,6 +228,18 @@ This action is a `composite` action.
# Required: false
# Default: ""
days-before-stale:
# Number of days before marking as stale
#
# Required: false
# Default: ""
days-before-close:
# Number of days before closing stale items
#
# Required: false
# Default: ""
pre-commit-config:
# Pre-commit configuration file path
#

View File

@@ -95,6 +95,12 @@ inputs:
parallel-builds:
description: 'Number of parallel builds'
required: false
days-before-stale:
description: 'Number of days before marking as stale'
required: false
days-before-close:
description: 'Number of days before closing stale items'
required: false
# File/path inputs
pre-commit-config:
@@ -218,6 +224,8 @@ runs:
INPUT_IMAGE_QUALITY: ${{ inputs.image-quality }}
INPUT_PNG_QUALITY: ${{ inputs.png-quality }}
INPUT_PARALLEL_BUILDS: ${{ inputs.parallel-builds }}
INPUT_DAYS_BEFORE_STALE: ${{ inputs.days-before-stale }}
INPUT_DAYS_BEFORE_CLOSE: ${{ inputs.days-before-close }}
INPUT_PRE_COMMIT_CONFIG: ${{ inputs.pre-commit-config }}
INPUT_BASE_BRANCH: ${{ inputs.base-branch }}
INPUT_DRY_RUN: ${{ inputs.dry-run }}