mirror of
https://github.com/ivuorinen/actions.git
synced 2026-02-09 10:45:36 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3c2de1bd1 | ||
|
|
f48f914224 | ||
|
|
5f14fd7ed3 | ||
|
|
277d5edf5c | ||
| 57cbd83dc6 | |||
| 33631ad911 |
@@ -31,9 +31,9 @@ runs:
|
|||||||
run: uv sync --frozen
|
run: uv sync --frozen
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '22'
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|
||||||
- name: Install Node dependencies
|
- name: Install Node dependencies
|
||||||
|
|||||||
42
.github/workflows/issue-stats.yml
vendored
Normal file
42
.github/workflows/issue-stats.yml
vendored
Normal 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
|
||||||
@@ -84,7 +84,7 @@ repos:
|
|||||||
args: ['-shellcheck=']
|
args: ['-shellcheck=']
|
||||||
|
|
||||||
- repo: https://github.com/renovatebot/pre-commit-hooks
|
- repo: https://github.com/renovatebot/pre-commit-hooks
|
||||||
rev: 41.148.2
|
rev: 41.149.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: renovate-config-validator
|
- id: renovate-config-validator
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
3.13.3
|
3.14.0
|
||||||
|
|||||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -3,5 +3,6 @@
|
|||||||
"connectionId": "ivuorinen",
|
"connectionId": "ivuorinen",
|
||||||
"projectKey": "ivuorinen_actions"
|
"projectKey": "ivuorinen_actions"
|
||||||
},
|
},
|
||||||
"sarif-viewer.connectToGithubCodeScanning": "on"
|
"sarif-viewer.connectToGithubCodeScanning": "on",
|
||||||
|
"makefile.configureOnOpen": false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ ARG ACT_VERSION=0.2.71
|
|||||||
ARG SHELLSPEC_VERSION=0.28.1
|
ARG SHELLSPEC_VERSION=0.28.1
|
||||||
|
|
||||||
# Stage 1: Build kcov separately to keep final image slim
|
# 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
|
ARG KCOV_VERSION
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ RUN cmake .. \
|
|||||||
&& make install DESTDIR=/kcov-install
|
&& make install DESTDIR=/kcov-install
|
||||||
|
|
||||||
# Stage 2: Base system setup
|
# Stage 2: Base system setup
|
||||||
FROM ubuntu:22.04 AS base
|
FROM ubuntu:24.04 AS base
|
||||||
|
|
||||||
LABEL maintainer="ivuorinen"
|
LABEL maintainer="ivuorinen"
|
||||||
LABEL description="GitHub Actions testing framework with pre-installed tools"
|
LABEL description="GitHub Actions testing framework with pre-installed tools"
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ runs:
|
|||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
id: setup
|
id: setup
|
||||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ steps.version.outputs.detected-version }}
|
node-version: ${{ steps.version.outputs.detected-version }}
|
||||||
registry-url: ${{ inputs.registry-url }}
|
registry-url: ${{ inputs.registry-url }}
|
||||||
|
|||||||
@@ -38,18 +38,12 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Validate Inputs
|
- name: Validate Inputs
|
||||||
id: validate
|
id: validate
|
||||||
shell: bash
|
uses: ./validate-inputs
|
||||||
env:
|
with:
|
||||||
GITHUB_TOKEN: ${{ inputs.token }}
|
action: 'stale'
|
||||||
run: |
|
token: ${{ inputs.token }}
|
||||||
set -euo pipefail
|
days-before-stale: ${{ inputs.days-before-stale }}
|
||||||
|
days-before-close: ${{ inputs.days-before-close }}
|
||||||
# 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"
|
|
||||||
|
|
||||||
- name: 🚀 Run stale
|
- name: 🚀 Run stale
|
||||||
id: stale
|
id: stale
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ Centralized Python-based input validation for GitHub Actions with PCRE regex sup
|
|||||||
| `image-quality` | <p>Image quality percentage</p> | `false` | `""` |
|
| `image-quality` | <p>Image quality percentage</p> | `false` | `""` |
|
||||||
| `png-quality` | <p>PNG quality percentage</p> | `false` | `""` |
|
| `png-quality` | <p>PNG quality percentage</p> | `false` | `""` |
|
||||||
| `parallel-builds` | <p>Number of parallel builds</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` | `""` |
|
| `pre-commit-config` | <p>Pre-commit configuration file path</p> | `false` | `""` |
|
||||||
| `base-branch` | <p>Base branch name</p> | `false` | `""` |
|
| `base-branch` | <p>Base branch name</p> | `false` | `""` |
|
||||||
| `dry-run` | <p>Dry run mode</p> | `false` | `""` |
|
| `dry-run` | <p>Dry run mode</p> | `false` | `""` |
|
||||||
@@ -226,6 +228,18 @@ This action is a `composite` action.
|
|||||||
# Required: false
|
# Required: false
|
||||||
# Default: ""
|
# 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-config:
|
||||||
# Pre-commit configuration file path
|
# Pre-commit configuration file path
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -95,6 +95,12 @@ inputs:
|
|||||||
parallel-builds:
|
parallel-builds:
|
||||||
description: 'Number of parallel builds'
|
description: 'Number of parallel builds'
|
||||||
required: false
|
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
|
# File/path inputs
|
||||||
pre-commit-config:
|
pre-commit-config:
|
||||||
@@ -218,6 +224,8 @@ runs:
|
|||||||
INPUT_IMAGE_QUALITY: ${{ inputs.image-quality }}
|
INPUT_IMAGE_QUALITY: ${{ inputs.image-quality }}
|
||||||
INPUT_PNG_QUALITY: ${{ inputs.png-quality }}
|
INPUT_PNG_QUALITY: ${{ inputs.png-quality }}
|
||||||
INPUT_PARALLEL_BUILDS: ${{ inputs.parallel-builds }}
|
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_PRE_COMMIT_CONFIG: ${{ inputs.pre-commit-config }}
|
||||||
INPUT_BASE_BRANCH: ${{ inputs.base-branch }}
|
INPUT_BASE_BRANCH: ${{ inputs.base-branch }}
|
||||||
INPUT_DRY_RUN: ${{ inputs.dry-run }}
|
INPUT_DRY_RUN: ${{ inputs.dry-run }}
|
||||||
|
|||||||
Reference in New Issue
Block a user